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"; }