Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint
Share this Page URL
Help

II. Answers > A. Answers to Chapter 1 Exercises

Appendix A. Answers to Chapter 1 Exercises

Answer 1.1: This exercise doesn’t really have an answer. Simply run the command:

$ perldoc perl
$ perldoc perlfunc

Answer 1.2: The trick is to run perldoc on itself:

$ perldoc perldoc

You can also simply run perldoc without giving it anything to read and it will print a summary of its use (which I’ve slightly edited and displayed here):

perldoc [options] PageName|ModuleName|ProgramName...
perldoc [options] -f BuiltinFunction
perldoc [options] -q FAQRegex

Options:
    -h   Display this help message

           [Perldoc v3.14_04]

It’s the –f switch that you want to look up documentation for the print function, which you already saw in this chapter:

$ perldoc -f print

Answer 1.3:

$ perldoc -q comma

  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial