-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
pe*********@hotmail.com (Chris Petersen) wrote in
news:d1**************************@posting.google.c om:
Is there a better/simpler way than this?
use POSIX ('strftime');
my $dateCreated = strftime "%b %d, %Y %H:%M", localtime
((stat("c:\\test.txt"))[10]);
How would I go about displaying the output in this format: 20031105
14:00? Any advice of links would be appreciated. Thanks in advance
-Chris
This is why I wrote Time::Format. I got sick of looking up the awkward
strftime %-codes, and was tired of having to make do when they weren't
flexible enough.
use Time::Format;
my $dateCreated = time_format('yyyymmdd hh:mm',(stat $file)[10]);
http://search.cpan.org/~roode/Time-F...0.13/Format.pm
Hope it helps.
- --
Eric
$_ = reverse sort $ /. r , qw p ekca lre uJ reh
ts p , map $ _. $ " , qw e p h tona e and print
-----BEGIN PGP SIGNATURE-----
Version: PGPfreeware 7.0.3 for non-commercial use <http://www.pgp.com>
iQA/AwUBP6mISWPeouIeTNHoEQLZQwCgnh5zmXI0rLBQYUzcMWpEU/T4dO0An28m
Qv8YB1yVKzx0ofBrlLrcFPfw
=0SEz
-----END PGP SIGNATURE-----