in reply to Re: top ten things every Perl hacker should know
in thread top ten things every Perl hacker should know

Know how to comment out large slabs of code easily.
  1. Mark the block to be commented.
  2. Fire up search and replace in regex mode
  3. Search for "^", replace with "#"
Of course you need a decent editor. The other way round should be obvious ;).


holli, /regexed monk/
  • Comment on Re^2: top ten things every Perl hacker should know

Replies are listed 'Best First'.
Re^3: top ten things every Perl hacker should know
by xdg (Monsignor) on Mar 16, 2006 at 23:48 UTC

    Or better yet, teach the editor to do 1, 2 and 3 (and the inverse) as a macro.

    And for those without a decent editor wondering what to do, I assume the original reference was about using Pod:

    =begin comment # lots of code here =end comment

    -xdg

    Code written by xdg and posted on PerlMonks is public domain. It is provided as is with no warranties, express or implied, of any kind. Posted code may not have been tested. Use of posted code is at your own risk.

Re^3: top ten things every Perl hacker should know
by johngg (Canon) on Mar 17, 2006 at 14:09 UTC
    At the risk of starting up a whole new discussion, my vote for a decent editor goes to nedit.

    Cheers,

    JohnGG