Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re: Pick a single item from a sub's return list

by shmem (Chancellor)
on Oct 31, 2015 at 11:28 UTC ( [id://1146569]=note: print w/replies, xml ) Need Help??


in reply to [Solved] Pick a single item from a sub's return list

You have to make a list from the result which you then can index, you can't index the call (or the call's parameter list). Try:

say+(givelist())[1];

The + after say is there just to disambiguate the list-parens from function-call-parens.

perl -le'print map{pack c,($-++?1:13)+ord}split//,ESEL'

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (6)
As of 2024-04-23 19:15 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found