in reply to RE: RE: Easy, elemental, but cool debug trick.
in thread Easy, elemental, but cool debug trick.
to remove the block, andperl -pi.bak -e 's/^(.*)$/#$1/ if /\bDEBUG\b/../\bENDDEBUG\b/' foo.pl
To reenable it. Then you can do something like this:perl -pi.bak -e 's/^#(.*)$/$1/ if /\bDEBUG\b/../\bENDDEBUG\b/' foo.pl
And yes, there is something very weird about using Perl to pre-process Perl...... code # DEBUG debug code # ENDDEBUG ... more code
--ZZamboni
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
RE: RE: RE: RE: Easy, elemental, but cool debug trick.
by mikfire (Deacon) on May 26, 2000 at 01:49 UTC |