Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re: printing element of anonymous array

by Athanasius (Bishop)
on Mar 03, 2018 at 15:43 UTC ( #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
Node Status?
node history
Node Type: note [id://1210283]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (4)
As of 2020-01-21 22:36 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Notices?