http://qs1969.pair.com?node_id=44362

ImpalaSS has asked for the wisdom of the Perl Monks concerning the following question:

Hellow Everyone,
I need help with a small problem. I have a perl script which created a table of data for the engineers here. Yesterday, my boss came to me and wanted certian parts ot the table to be links to other scripts within the system. Well, that was no problem, but a new bug presented itself today. Basically, the script in question has parameters as follows,  http://www-mat.nextel.com/cgi-bin/stats-cgi/perlsort?date=30Nov00&metric=2&report_type=Busy+Hour&datatype=Philly&market=PHL. Now, that prints a table, with about 30 colums and 1200 rows, and the last row, there is a link to another script, which looks like this http://www-mat.nextel.com/cgi-bin/stats-cgi/halfhr.cgi?date=31Nov00&netid=0013-1&market=PHL.

Now, the problem isnt creating the links, it has to do with the date paramter in the link. See what happens is, in the second file, the data has to be one day after the date that you would want the data to be called for. So if i want the data for the 30th of november, i would need to put the 1st of december in the script. So here was mty solution, to take the first 2 characters of the date, add one, and then put the date backtogether.. that works for everyday.. except the last day of any given month, (ie: today). My question is.. is there a way to logically take the date in the script ( it would be in the format of 30Nov00 and make it 01Dec00 chronogically instead of the way i am doing it now? Here is the way i do it currently. <code> $date2 = $date; if ($date ne "today"){ $newdate = substr($date2, 0, 2); $enddate = substr($date2, 2, 5); $newdate++; $date2 = $newdate.$enddate; }
Well, thank you very much once again in advance


Dipul