in reply to Time in Perl

As good monk belg4mit said, localtime is likely may be what you're looking for. The local perldoc is your friend, as is the PerlMonks search form at the upper left.   But to get you started, try QandASection: dates and times, which contains several examples that may help.

Update: Depending on what you're going to do with your human-readable date/timestamp, printf (print a formatted string) and sprintf (return a formatted string) may also be worth delving into.

Oh yeah, and welcome to the Monastery!
    cheers,
    Don
    striving toward Perl Adept
    (it's pronounced "why-bick")
  • Comment on Re: Time in Perl (examples in PerlMonks Q&A dates-and-times section, plus (s)printf)

Replies are listed 'Best First'.
Re: Re: Time in Perl (examples in PerlMonks Q&A dates-and-times section, plus (s)printf)
by {NULE} (Hermit) on Apr 28, 2002 at 14:50 UTC
    To add a bit to what brother ybiC states there is another function that has made my life piles easier.
    use POSIX; print strftime("%Y-%m-%d %H:%M:%S", localtime),"\n"; # This displays the following: # 2002-04-28 10:52:32 # (Assuming I ran this when I was typing. {g})
    Do a man strftime to find out what all the formats are.

    {NULE}
    --
    http://www.nule.org