in reply to Re: Re: map() abuse or child with a chainsaw
in thread map() abuse or child with a chainsaw
Well, no dont do that.map shift(@ARGV), qw(two times)
:-)
A very good hint is that you are using map in void context. Thats dumb. (no offense to obfuscators at large ;-). Map is _meant_ to return a set of values, its not meant to be used as a for loop. (In fact my personal belief is that map() and grep() are sorely sorely misnamed. They should be called apply() and filter(), but thats another flame-war iykwim)
I would say that your second choice is preferred, or possibly
But map in void context? No thanks.shift @argv for (1,2);
Oh and of course, using Getopt would be a good idea too. (jeffa++)
Yves / DeMerphq
---
Writing a good benchmark isnt as easy as it might look.
|
|---|