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

Re: Refactoring: dumb or witty use of ternary operator?

by Abigail-II (Bishop)
on Jun 22, 2004 at 10:06 UTC ( #368656=note: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    $outhash {$str} ||= 0;
    $outhash {$str} ++;
    
  2. or download this
           "undef" is always treated as numeric, and in particular is
           changed to 0 before incrementing (so that a post-increment
           of an undef value will return 0 rather than "undef").
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (8)
As of 2014-08-27 23:54 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (253 votes), past polls