http://www.perlmonks.org?node_id=515265


in reply to Re: open file for read/write
in thread open file for read/write

Minor nit, but a C-style for loop like that is really unnecessary here. You can do:

for $elem (@ARRAY) { $elem =~ s#find#replace#; }
Or even more concisely:
s#find#replace# for @ARRAY;