Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery

Re: Getting single element from an array

by choroba (Canon)
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 meditating upon the Monastery: (6)
As of 2015-11-25 02:26 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (668 votes), past polls