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

Re: printing element of anonymous array

by dave_the_m (Monsignor)
on Mar 03, 2018 at 15:39 UTC ( #1210282=note: print w/replies, xml ) Need Help??


in reply to printing element of anonymous array

The outer parentheses are being grabbed by the print function. You need
perl -e 'print ((gmtime(time))[6]);'

PS - technically, it's a list, not an anonymous array, being returned by gmtime.

Dave.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (8)
As of 2019-07-18 09:36 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?