in reply to perl in line editing help

Have you thought about simply changing print to a subroutine call instead?

sub status { if( $ENV{DEBUG}) { print "@_"; }; }; status( "this is name",$self->{name},"\n" );

Also see Log::Log4Perl.

Also, you might want to learn to use your text editor. Most text editors can do various forms of search and replace.