Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re: storing date into variable

by skangas (Novice)
on Nov 10, 2009 at 13:55 UTC ( [id://806218]=note: print w/replies, xml ) Need Help??


in reply to storing date into variable

The other posters have said mostly everything there is to say.

I would just like to point out that you might want to try DateTime that's available from CPAN. While localtime is a builtin, and therefore automatically available on all Perl installations everywhere, in my opinion it's a drag trying to remember the format of localtime. When it comes to dates and times, a good rule of thumb is that it's always better to use DateTime. So this means sure, you could waste some time learning localtime just for this time, and next time you need something more than showing a date you can learn DateTime. Or, you can go with DateTime right now and skip the intermediate step. Personally, I'd go with the latter.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others sharing their wisdom with the Monastery: (8)
As of 2024-03-28 07:58 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found