in reply to Re: Last mod not working
in thread Last mod not working
use LWP::Simple; use warnings; use strict; my $url = 'www.perl.com'; my $content = get($url); my $lastMod = (head($url))[2]; if (defined $lastMod) { my ($lastModFormat) = scalar localtime($lastMod); print "$lastModFormat\n"; } else { print "Time not available\n"; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: Last mod not working
by monktim (Friar) on Jan 28, 2004 at 18:51 UTC |