Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: localtime function

by Anonymous Monk
on Jan 27, 2015 at 08:14 UTC ( [id://1114601]=note: print w/replies, xml ) Need Help??


in reply to localtime function

Please wrap your code in <code> tags. Have a look at The Perl Monks Guide to the Monastery and How do I post a question effectively?

However, I do see a couple of things: The or die $! should be on the opens, not on the variable assignment, and it's scalar not "scaler". You should be getting an error message to that effect - please also always post any error messages you are getting here.

Your problem seems to be coming from the assignment that looks like it's my @conv=scalar(localtime($data[2])); because scalar only returns one value, which you are assigning to an array @conv, so @conv is now an array with only one element, $conv[0], but then you access $conv[2] which does not exist. So either access $conv[0] instead of $conv[2], or change @conv to $conv and only work with $conv after that.

Log In?
Username:
Password:

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

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

    No recent polls found