From: Builder  http://builder.com.com

Presents your
PERL E-NEWSLETTER for April 11, 2002

COMMENT OUT CODE WITH POD

Commenting out large blocks of code can be more laborious in Perl than
in C and C++ because Perl doesn't have a multiline comment operator like
'/* .. */'. A decent editor with macros could make this a little easier,
but a quick and simple way to achieve the same result is to use the
documentation format (POD) to hide the lines you want to comment out.

To prevent the code from being executed, enclose the lines with an
opening '=begin' line and closing '=end' and '=cut' lines. The '=begin' and
'=end' directives are not interpreted as POD text, so they won't show up in
your POD documentation.

Here's an example:

# code here..
=begin comment
# lots of code here effectively commented out
=end comment
=cut
# more code here..


-- 
-------------------------------
-  Teresa Raymond             -
-  Mariposa Net               -
-  http://www.mariposanet.com -
-------------------------------

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to