in reply to Find and Replace from File List

an alternative also is, if you prefer to use as much as less modules possible:
#!/usr/bin/perl use strict; no warnings; foreach my $in (@ARGV){ my($copy) = "$in.bak"; copy($in, $copy) or die "File cannot be copied. \n"; open(INPUT,"$copy") or die 'Cannot open file: $!\n'; open(OUTPUT,">$in"); my($replacePattern1) = "foo1"; ... }
or if the files are in a dir then use the readdir function, collect all the files from the dir and loop over them like in the example before
opendir(DIR, $ARGV[0]) || die "i died for no reason ;)\n"; foreach (readdir DIR){ #repeat like above #watch out for defining the right path to dir and when looping re-ty +pe the fool path to your dir, like: # open (FILE, ">", "$ARGV[0]/$_") || die "i died for no reason ;)\n" }