use strict; use warnings; use WWW::Mechanize; use Data::Dumper; my $price = '249,9'; print "price: $price\n"; my $url = 'http://www.baur.de/is-bin/INTERSHOP.enfinity/WFS/Baur-BaurDe-Site/de_DE/-/EUR/BV_ExternalCall-Start?ArticleNo=515358&NUMSArt=4443504&NUMSArtPc=4488615&AffiliateID=pangora-bd&Name=pangora-produktdaten-baur&ActionID=preis-produkt-suche-baur&WKZ=79&IWL=101'; my $mech = WWW::Mechanize->new(); $mech->agent('Firefox/1.0 (Windows; U; Win98; en-US; Localization; rv:1.4) Gecko/20030624 Netscape/7.1 (ax)'); $mech->get( $url ); my $html = $mech->content; print "html from $url doesn't match $price\n" unless $html =~ /$price/ ; print "but paste into browser and view source, and it does\n"; print "final url after firefox redirect (but not www::mech redirect) is something like " . 'http://www.baur.de/is-bin/INTERSHOP.enfinity/WFS/Baur-BaurDe-Site/de_DE/-/EUR/BV_DisplayProductInformation-ArticleNo;sid=7oVhaTsE5oZsaX6rnON4q25Uv6S6Ixu_PzIwW50ajEGxS04TwoV1a_bGFYiItw==?ArticleNo=515358&ls=0&firstPage=true&showGewinnspiel=true&showW3B=false' . "\n"; # uncomment this to print html, which is totally different from what you get from firefox, show source. # print "html: $html";