Gossamer Forum
Home : General : Perl Programming :

This is the code to "detect" last modification date.

Quote Reply
This is the code to "detect" last modification date.
This is the code to "detect" last modification date.
when I use this code:
--------------------------------------------
#!/usr/local/bin/perl

use LWP::UserAgent;
my $agent = new LWP::UserAgent;
my $req = new HTTP::Request ('GET', 'http://members.tripod.com/mp3oricon/');
my $resp = $agent->request ($req);
print "Content-type: text/html\n\n";
print "Last Updated: ", scalar localtime $resp->last_modified(), "\n";
--------------------------------------------
the browser print out "Last Updated: Wed Dec 31 16:00:00 1969"
actually this file is last updated at 1999/6/6 AM 06:05

Also I dont want 'Wed' and '16:00:00' to be showed up, can it be done??