use File::Find; my @new_list; find sub { push @new_list, $File::Find::name if --- some criterion here ---; }, @ARGV; @ARGV = @new_list; $^I = ".bak"; while (<>) { s/old/new/g; print; }
-- Randal L. Schwartz, Perl hacker
In reply to Re: Shell trick to edit many files with perl
by merlyn
in thread Shell trick to edit many files with perl
by jepri
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |