uniq:
+ self describing code
+ behavior is guaranteed by module docs
- needs a module (but I have it on our servers already)
grep:
- unobvious construct
- behavior might change in future versions of perl (although that's unlikely)
- declares auxiliary variable that might interfere with other code
The choice is quite obvious to me. :-)
In reply to Re^6: Order in which grep/map receive elements
by abufct
in thread Order in which grep/map receive elements
by abufct
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |