P is for Practical | |
PerlMonks |
comment on |
( [id://3333]=superdoc: 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 reply to Re: Re: returning scalar context from map or grep
by !unlike
|
|