Depends on how good looking the date is too.
$Bill Luebkert wrote:
Jonathan Dudson wrote:
I am pretty much a newbie when it comes to perl.
I am trying to break up either localtime or time so they I end up with
three separate variables $date (06) $month(02) $year(2006) that I can
use in an archiving script.
Someone suggested using date calc but that appears to work with values
passed to it that you may already have.
Any suggestions would be great.
my ($date, $month, $year) = (localtime)[3,4,5];
$month++, $year += 1900;
print "$date, $month, $year\n";
The month is in 0-11 form and you may have to add one for printing
and the year is 1900 based.
_______________________________________________
ActivePerl mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
--
I always have coffee when I watch radar!
_______________________________________________
ActivePerl mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs