Sean King wrote:
Chas Owens wrote:
map(s/$find/$replace/, @arr);
You should not use map in a void context, it is bad form.
Care to explain?
Neither 'strict' nor 'warnings' complains, and it does what it says on the
tin, but if I've missed something fundamental here I'd be grateful to know
about it.
map() implements a mapping - a translation of one list into another by
applying a function to each element. Just because it has to apply this
function to every element in the target list isn't a good reason to use it
as a for loop.
Rob
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/