laziness, impatience, and hubris | |
PerlMonks |
Re: Re: returning scalar context from map or grepby !unlike (Beadle) |
on Apr 28, 2003 at 13:59 UTC ( [id://253696]=note: print w/replies, xml ) | Need Help?? |
Thanks for the warning. However in this instance the problems you noted do not occur in my case. I'm using grep to return a list of hash keys are in the superset and not the subset of two hases. However I know that the difference in the size of the two hases will only ever be one or two key/value pairs. As I am only ever interested (for now) in the first element I wanted to return a scalar value so that later code didn't have to manage an array. If at a later date the size of the difference does increase I will reconsider my aproach to this problem.
Cheers all. !unlike I write my Perl code like how I like my sex: fast and dirty. ;)
In Section
Seekers of Perl Wisdom
|
|