in reply to Re: Replacing one string with another string
in thread Replacing one string with another string

=~ doesn't operate on arrays (at least not in 5.005)
@a = ("one","two","three"); @a =~ s/[oe]/_/g; print join("\n",@a),"\n";
yields a compilation error
Can't modify array deref in substitution at t.pl line 2, near "s/[oe]/ +_/g;"
open(DATA,"file.inf") || die "can't open: $!"; local $/; # make a local copy of $/ so we don't trample other fi +lehanles undef $/; # undef it $file = <DATA>; # so we can slurp up the whole file in one bang $file =~ s/Name/Fullname/g;
is probably more what like what you were aiming at. But merlyn's (excellent as always) solution is the one I'd end up using.

/\/\averick