in reply to Find and Replace
my($find) = "cps***"; my($replace) = "nat***"; my $copy; if(-e $ARGV[0]) { $copy = "$ARGV[0].bak"; copy($ARGV[0], $copy) or die "File cannot be copied. \n"; } [download]
See also: Variables and Scoping