You don't need to run perl through system, you can do that directly in perl:
#!/usr/bin/perl use strict; use warnings; { local ( $^I, @ARGV ) = ( '', 'test.txt' ); while ( <> ) { s/#//; print; } } { local ( $^I, @ARGV ) = ( '', 'test.txt' ); while ( <> ) { s/(?=.*\btest\b)/#/; print; } }
In reply to Re: System command problem in perl
by jwkrahn
in thread System command problem in perl
by vr786
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |