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

Re^3: Shortcut operator for $a->{'b'}=$b if $b;

by ikegami (Patriarch)
on Sep 20, 2005 at 16:32 UTC ( [id://493506]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    sub assign_if_defined {
       $_[0] = $_[1] if defined $_[1];
    }
    
    assign_if_defined($a->{'b'}, $b);
    
  2. or download this
    sub { $_[0] = $_[1] if defined $_[1]; }->($a->{'b'}, $b);
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others taking refuge in the Monastery: (4)
As of 2024-04-25 04:59 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found