Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

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

by ikegami (Pope)
on Sep 20, 2005 at 16:32 UTC ( #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
Node Status?
node history
Node Type: note [id://493506]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (7)
As of 2014-12-26 01:19 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (163 votes), past polls