Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic

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 contemplating the Monastery: (10)
As of 2015-07-31 07:40 GMT
Find Nodes?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...

    Results (275 votes), past polls