To do it your way you would just write @ARGV = qw/file1 file2 file3/; but you can just provide these filenames from the command line, so if your perl script is called do_it then you call it with perl do_it file1 file2then $ARGV[0] in your program would contain file1 and $ARGV[1] would be file2.
You can specify the backup copy also from the command line with perl -i.bk do_it foo.barinstead of using $^I = '.bk';
-- Hofmator
In reply to Re: modifying multiple files
by Hofmator
in thread modifying multiple files
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |