Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re^2: Parenthetical help

by eye (Chaplain)
on Apr 04, 2011 at 04:59 UTC ( #897268=note: print w/ replies, xml ) Need Help??


in reply to Re: Parenthetical help
in thread Parenthetical help

Good point. The code I posted was oversimplified to isolate the issue. The original code was getting the modify time of a file and looked more like:

localtime((stat $file)[9])


Comment on Re^2: Parenthetical help
Download Code
Replies are listed 'Best First'.
Re^3: Parenthetical help
by jwkrahn (Monsignor) on Apr 04, 2011 at 19:35 UTC

    The problem is that localtime has a prototype and that prototype says that localtime's first argument, if present, must be a scalar value, so arrays and lists are converted to a scalar value so localtime can use it.

    $ perl -le'print prototype "CORE::localtime"' ;$

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (13)
As of 2015-07-31 13:43 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

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









    Results (277 votes), past polls