in reply to modifying multiple files
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
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: modifying multiple files
by Anonymous Monk on Aug 03, 2001 at 20:18 UTC | |
by Hofmator (Curate) on Aug 03, 2001 at 20:23 UTC |