@a = ("one","two","three"); @a =~ s/[oe]/_/g; print join("\n",@a),"\n"; #### 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 filehanles undef $/; # undef it $file = ; # so we can slurp up the whole file in one bang $file =~ s/Name/Fullname/g;