Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re: return a hash or undef

by psini (Deacon)
on Aug 03, 2009 at 19:59 UTC ( [id://785539]=note: print w/replies, xml ) Need Help??


in reply to return a hash or undef

Two possible solutions:

  • Modify the sub to return a hash reference or undefined, if defined dereference it
  • If you can't change the sub, store the result in an array and, if defined, copy it to an hash

Rule One: "Do not act incautiously when confronting a little bald wrinkly smiling man."

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others admiring the Monastery: (6)
As of 2024-03-29 13:01 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found