We don't bite newbies here... much | |
PerlMonks |
Re: Pick a single item from a sub's return listby shmem (Chancellor) |
on Oct 31, 2015 at 11:28 UTC ( [id://1146569]=note: print w/replies, xml ) | Need Help?? |
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'
In Section
Seekers of Perl Wisdom
|
|