in reply to Re^2: find & replace a string in perl
in thread find & replace a string in perl
is definately wrong as Corion has been saying.if( $line =~ s/\btest\b/^\#/ig ) { print "$line\n"; }
if( $line =~ m/test/ ) { $line = "#" . $line; print "$line\n"; }
|
|---|