Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: lvalue subs return undef, playing with experimental features, the End of the World, etc

by tadman (Prior)
on May 07, 2002 at 06:08 UTC ( [id://164539]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    sub assign_to_hash : lvalue
    {
         exists($hash{$_[0]})? $hash{$_[0]} : undef;
    }
    
  2. or download this
    sub assign_to_hash : lvalue
    {
         exists($hash{$_[0]})? $hash{$_[0]} : $hash{$_[0]} = undef;
    }
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others sharing their wisdom with the Monastery: (2)
As of 2024-04-26 00:57 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found