Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

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

by LanX (Bishop)
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 all is quiet...

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (8)
As of 2017-11-20 23:44 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    In order to be able to say "I know Perl", you must have:













    Results (294 votes). Check out past polls.

    Notices?