Rob Dixon wrote:
> > map(s/$find/$replace/, @arr);
> Haha yes you can, but if you want to write nasty code go for
>   grep s/$find/$replace/, @arr;
> which also works.

True, but grep implies "find stuff", while map implies "do stuff", so your 
nasty code is way, way, nastier than mine - it masks the intention.

Maybe using map in void context is deep-level wrongness, but it'd be nice if 
somebody would explain WHY, instead of posting "don't do it" one-liners. 

-- 
[EMAIL PROTECTED] [pgp: 8A8FA6DE]


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/


Reply via email to