Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re: ||= (poorly documented?)

by tobyink (Abbot)
on Jul 09, 2012 at 06:54 UTC ( #980663=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    $foo X= $bar;
    # is short for:
    $foo = $foo X $bar;
    
  2. or download this
    $foo += $bar;
    # is short for:
    ...
    $foo *= $bar;
    # is short for:
    $foo = $foo * $bar;
    
  3. or download this
    $OUTFH{$name} = $OUTFH{$name} || IO::File->new(">g:\\perl_scripts\\$na
    +me.log");
    $FH           = $OUTFH{$name} or die $!;
    
  4. or download this
    my $result = $cache{$input} ||= my_function($input);
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://980663]
help
Chatterbox?
[chacham]: Chlorine Trifluoride

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (None)
    As of 2017-04-28 11:22 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?
      I'm a fool:











      Results (521 votes). Check out past polls.