|( #3333=superdoc: print w/replies, xml )||Need Help??|
What you seem to be wanting is a way to pass a date as a parameter, and use today only as a default. Or, pass a relative day offset, with 0 for today, -1 for yesterday and 1 for tomorrow, for example.
It might be helpful if you didn't depend on the external program date to get the dateparts. Perl is perfectly capable of handling those dateparts itself, either on its own, or via simple, standard modules, or via more elaborate CPAN modules (and that's just one example). The latter can be used for relative date calculations; on the latter you can get by calculating the times in seconds, but watch out for summer time, and thus days that are not 24 hours long. Calculating days relative to noon, on any day, is safe.
To pass around the values, you need form variables (thus a HTML form, or equivalent), and form values processing on the server side, either via GET or POST; CGI.pm, which you are already using, will do fine.
I could elaborate and give examples on all approaches, but just one solution is enough so you'd better let us know which approach you're thinking on taking.
In reply to Re: changing title of a webpage dynamically