in reply to Re: formatted output of localtime()
in thread formatted output of localtime()

Too bad Perl doesn't have the strftime function.
I can't tell if you're joking, or serious. I'll presume you're serious, and post the following code without comment:
use POSIX qw(strftime); print strftime("Today is %A, %d %B %Y!\n", localtime);
This has worked for as long as the POSIX module has been around.

-- Randal L. Schwartz, Perl hacker

Replies are listed 'Best First'.
Re: Re: Re: formatted output of localtime()
by John M. Dlugosz (Monsignor) on Sep 18, 2001 at 10:30 UTC
    Yes, was serious. Not listed under "time" functions in perlfunc. Other C-like functions such as sprintf don't require special modules. I work on Windows, so am not particulary familiar with the POSIX module. I use the Win32 modules.

    —John