Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: Re: returning scalar context from map or grep

by !unlike (Beadle)
on Apr 28, 2003 at 13:59 UTC ( [id://253696]=note: print w/replies, xml ) Need Help??


in reply to Re: returning scalar context from map or grep
in thread returning scalar context from map or grep

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. ;)

  • Comment on Re: Re: returning scalar context from map or grep

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://253696]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others having a coffee break in the Monastery: (5)
As of 2024-04-23 19:36 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found