Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: set context for method's return values

by AlexP (Pilgrim)
on Jan 25, 2022 at 06:51 UTC ( [id://11140836]=note: print w/replies, xml ) Need Help??


in reply to set context for method's return values

I think you just need to correctly place the brackets:

print((split(",", "A,B,C,D"))[2]);

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others meditating upon the Monastery: (3)
As of 2024-03-29 02:18 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found