in reply to Re^2: Check website has update file using www::mechanize
in thread Check website has update file using www::mechanize
The following may help:
#!/usr/bin/perl use warnings; use strict; use WWW::Mechanize; my $url = 'http://perlmonks.org/?'; my $mech = WWW::Mechanize->new(); my $response = $mech->head($url); my $modDate = $response->header('last-modified'); if (defined $modDate) { print "Modification date: $modDate\n"; } else { print "Last modification date not available\n"; }
Prints:
Modification date: Wed, 25 May 2016 07:45:13 GMT
|
|---|