Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: Trouble getting size of list returned from sub

by DrHyde (Prior)
on Nov 26, 2012 at 12:24 UTC ( #1005628=note: print w/ replies, xml ) Need Help??


in reply to Trouble getting size of list returned from sub

$ perl -E 'sub foo { qw(a b c d) } say $#{[foo()]} + 1'


Comment on Re: Trouble getting size of list returned from sub
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (5)
As of 2016-02-14 14:56 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How many photographs, souvenirs, artworks, trophies or other decorative objects are displayed in your home?





    Results (470 votes), past polls