Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

new keyword "size" to avoid scalar trap ? ( scalar @array != scalar(LIST) )

by LanX (Canon)
on Dec 07, 2012 at 16:40 UTC ( #1007787=perlmeditation: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    size @a := scalar @a;
    
  2. or download this
    size (a..c) := scalar @{[a..c]}
    
  3. or download this
    sub size([@$];@) {
    ...
    }
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlmeditation [id://1007787]
Front-paged by Arunbear
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (6)
As of 2014-12-21 04:22 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

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





    Results (102 votes), past polls