in reply to Help with dates
Check out the Date::Manip module on CPAN, or try perldoc as it has quite an extensive writeup on it. It will enable you to manipulate any date in any way that you want.
andchomp ($today = `date '+%a'`); chomp ($d = `date '+%d'`); chomp ($m = `date '+%m'`); chomp ($y = `date '+%y'`);
@days = grep { $_ ne $today } qw/Sun Mon Tue Wed Thu Fri Sat/; %month = (1, 31, 2, 29, 3, 31, 4, 30, 5, 31, 6, 30, 7, 31, 8, 31, 9, 30, 10, 31, 11, 30, 12, 31);
With Date::Manip this part of the code will become obsolete. You will no longer need to fill the %month hash, as you can just check against it. You can also see which day of the week it is. Date::Manip also uses UNIX "+%" (ie: +%j for julian date). Strong mojo for the needy date coder.
Paulster2
|
|---|