--- SAWMaster <[EMAIL PROTECTED]> wrote:
> Is there a way to "block comment" in Perl?
> 
> My book only covers using # to comment individual lines.
> 
> Is there a symbol I can use to comment out entire sections of code for the debugging 
>process?

I like to use a debugging constant.

    use constant DEBUGGING => 0;

    if ( DEBUGGING )
    {
        warn "Someval: $someval\n";
    }

Later, if I need to do more development or debugging, I can change the constant's 
value to one and
globally enable the debugging features.  This has the advantage of not having to go 
through and
"uncomment" all of my commented out sections.  Further, it's immediately clear to any 
maintenance
programmer exactly what you intended.

Cheers,
Curtis "Ovid" Poe


=====
Senior Programmer
Onsite! Technology (http://www.onsitetech.com/)
"Ovid" on http://www.perlmonks.org/

__________________________________________________
Do You Yahoo!?
Make a great connection at Yahoo! Personals.
http://personals.yahoo.com

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

Reply via email to