--Code-- use WWW::Mechanize; use HTTP::Cookies; use threads; $|=1; my $cookie_jar = HTTP::Cookies->new; $mech = WWW::Mechanize->new( agent => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:21.0)', cookie_jar => $cookie_jar, timeout => "15", autocheck => 0); $url = 'http://www.fwrd.com/product-military-boots/YEF3-MZ2/'; # page will default to error page if not around... $delay = 15; check(); sub check { print "[x] starting...\n"; while(1) { $resp = $mech->get($url); if((!$resp->is_success) || ($resp->request->uri =~ m/error/i)) { print "."; } else { for $sz (1..5) { $thread = threads->new( sub { notify_plz($sz) }); my $tid = $thread->tid; push (@Threads, $thread); $thread->detach(); } # we saw the page , exit exit; # end what we do if its found } sleep $delay; } }