Skip navigation.
Home
Your source for Perl tips, howto's, faq and tutorials

make multiline comments

( categories: )

Perl, by default, does not have any specific tokens to specify multiline comments. Nevertheless, there are several workarounds to accomplish this.

The easiest solution is to use the POD system, enclosing the comments between 2 lines: the first line should begin with '=comment' and the last line should begin with '=cut'.

Example:

=comment multiline_comment
 
This is
a
multiline
comment
 
=cut


perl debugger commands

( categories: )

- INVOKING THE DEBUGGER

perl -d script.pl

- QUITTING THE DEBUGGER
q

NOTE: All the commands below are executed from within the debugger.

- LISTING THE SOURCE CODE

- List next window of lines
l

- List a specific line
l line_number

- List first window of lines from a specific subroutine
l subroutine_name

- View some lines of code around the current line
v

- BREAKPOINTS

- Set a breakpoint in the current line:


getting information about a built in function

( categories: )

Use perldoc:

perldoc -f function

Example:

perldoc -f split

get module information

( categories: | )

-- READ MODULE DOCUMENTATION

There are 2 ways to get the information:

perldoc module
 
Example: perldoc CGI

or

man module
 
Example: man Mail::Send

 

-- READ SOURCE CODE

If you want to have a look at both the documentation and source code of a module, run the following:

perldoc -m module
 
Example: perldoc -m IO::Dir

 

-- SHOW THE PATH WHERE A MODULE IS INSTALLED

perldoc -l module
 
Example: perldoc -l Catalyst


Syndicate content