Our standards require us to put last modified and maintained by information at the foot of each web page we serve up, even the scripts... I was going to use Server Side Includes, but I thought, "wait, surely timtowtdt". So, if you have date::manip installed,
my $lastmod = ParseDate (int (-M "chiron_test.cgi" )." days ago"); print "Last Modified : ".UnixDate($lastmod,"%A, %b %E, %Y");
Don't listen to me, listen to Fastolfe

Replies are listed 'Best First'.
Re: Faking a ssi last modified command
by Fastolfe (Vicar) on Feb 08, 2001 at 00:58 UTC
    A less expensive method:
    use POSIX 'strftime'; print "Last Modified: ", strftime("%a, %b %e, %Y", localtime(stat("chiron_test.cgi"))[9]);
    See POSIX for information on strftime, or check your system's local strftime manpage for format options.
      You can even get rid of the hardcoded name, and use either $0 there, or DATA as long as you have an __END__ and haven't closed it yet.

      -- Randal L. Schwartz, Perl hacker

        or __FILE__ for that matter...