in reply to time as number

Since you indicated you are a "newbie" and did not indicate what operating system you were on let me expand on what steves has offered:

use POSIX qw(strftime);

This line exports ONLY the string format time function from the POSIX core module.

If you do not recognize the "template" that steves used, they come from the posix date command.

You may want to ask the oracle for answers on man date.

This will explain what each formatting directive does.

For example:

%a Abbreviated weekday name. For example, Wed. %A Full weekday name. For example, Wednesday. %b Abbreviated month name. For example, Jan. %B Full month name. For example, January.
Hope this helps - cheers - L~R

Replies are listed 'Best First'.
Re: Re: time as number
by demerphq (Chancellor) on Feb 21, 2003 at 23:13 UTC

    It should be kept in mind that the POSIX module doesn't specify which %Formats strftime should support. The native Win32 version for instance doesn't support at least one that the Cygwin libraries do. From what i've seen from the web the strftime formats vary quite a bit. Don't expect them all to work. I put this together from one of the longest lists I could find on the web.

    Which outputs on Perl AS 633

    It'd be interesting to see how widely it varies, and which POSIX standard that perl is supposed to be complaint with. I found quite a few.

    ---
    demerphq