use strict; use warnings; use URI::Escape; use WWW::Mechanize; use Test::More qw(no_plan); my ($sitemap, $escaped); my ($yahoo, $live, $google, $ask); my ($debug); my (@allsites); my $agent; $debug = 1; $yahoo = 'http://search.yahooapis.com/SiteExplorerService/V1/ping?sitemap='; $google = 'http://www.google.com/webmasters/tools/ping?sitemap='; $live = 'http://webmaster.live.com/webmaster/ping.aspx?siteMap='; $sitemap = 'http://www.yuonlamp.com/sitemap.xml'; $ask = 'http://submissions.ask.com/ping?sitemap='; push @allsites, $yahoo, $google, $live, $ask; $escaped = uri_escape($sitemap); $agent = WWW::Mechanize->new(autocheck => 1); foreach my $site (@allsites) { my $url; $url = $site . $escaped; print "$url\n" if $debug; $agent->get($url); ok($agent->status() == 200); print $agent->content if $debug; print "\n"; } exit(0);