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

Re: Getting single element from an array

by choroba (Chancellor)
on Nov 01, 2012 at 09:20 UTC ( #1001785=note: print w/ replies, xml ) Need Help??

in reply to Getting single element from an array

The ( in the second case is taken by the parser as starting the argument list. When the [ is being parsed, it is already too late to change mind. You can use + to disambiguate:

print +("adf","ff","f")[1];
لսႽ ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ

Comment on Re: Getting single element from an array
Select or Download Code

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (6)
As of 2016-02-09 18:49 GMT
Find Nodes?
    Voting Booth?

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

    Results (323 votes), past polls