Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re: printing element of anonymous array

by Athanasius (Archbishop)
on Mar 03, 2018 at 15:43 UTC ( [id://1210283]=note: print w/replies, xml ) Need Help??


in reply to printing element of anonymous array

Hello perltux,

FTR, you can also disambiguate the syntax with a plus sign:

1:41 >perl -e "print (gmtime(time))[6];" syntax error at -e line 1, near ")[" Execution of -e aborted due to compilation errors. 1:41 >perl -e "print ((gmtime(time))[6]);" 6 1:41 >perl -e "print +(gmtime(time))[6];" 6 1:41 >

Hope that helps,

Athanasius <°(((><contra mundum Iustus alius egestas vitae, eros Piratica,

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (6)
As of 2024-04-19 16:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found