> Or shorten it up a couple of lines:
> 
> my ($mday, $mon, $year) = (localtime)[3,4,5];
> my $yesterday = sprintf "%02d%02d%04d", $mday, $mon+1, year+1900;
> 
> And if you really wanted yesterday's date, you should have subtracted
> a day off the epoch :
> 
> my ($mday, $mon, $year) = (localtime (time - 86400))[3,4,5];
> _______________________________________________

Seeing people like $Bill replied for all problems/questions raised here in
forum makes my day bright :). It's precise and informative and helps me
format my scripts in more professional manner. Because of people like him, I
am honored to be a member of this forum. Keep it up guys :)




-- 
This message has been scanned for viruses and dangerous content by 
host-center.net and is believed to be clean.

_______________________________________________
ActivePerl mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to