Quote:
Originally Posted by moos3
can I call sed like that in a perl script?
|
I showed you the
perl equivalent!
or if you want it in a script.
Code:
#!/usr/bin/perl
local $^I = ".bak"; # in place editing with backup file
@ARGV = qw(file1 file2 file3); # set this to your list of files
while (<>) {
s/THIS/THAT/g;
}
if you don't want a backup use:
Code:
#!/usr/bin/perl -i
@ARGV = qw(file1 file2 file3);
while (<>) {
s/THIS/THAT/g;
}
simplesss
your find script is bad. why are you calling
grep from perl??????
use
File::Find or
glob
e.g:
Code:
@ARGV = (<*.txt>,<*.doc>);
[/code]