Hi M<onks, if any one can help me in this then it would be very great. my code is:
#!/usr/bin/perl use WWW::Mechanize; use warnings; my $mech = WWW::Mechanize->new(); my $mechx = WWW::Mechanize->new(autocheck => 0, autodie => 0); my $url = 'http://www.topbuy.com.au'; $mech->get($url); $content= $mech->content; if($content=~/id="topbuy-nav-category-wrapper">(.*?)id="topbuy-nav-fea +tures"/isxm){ $c = $1; @urls=''; while($c=~/href=(http.*?\.html)/gixsm){ $a_l = $1; if($a_l~~@urls){} else{push(@urls, "$a_l");} } } foreach $url (@urls) { continue_shopping($url); $mech->get($url) or die $!; $con1 = $mech->content(); $row = 0; while($con1 =~/<h5>(.*?)<\/h5>.*?"topbuy-subcategory">(.*?)<\/ul>/ +gisxm){ print "$1:$2\n"; } } sub continue_shopping{ my $a= shift; print $a; $mechx->get($a); $related = ''; $mechx->get("http://www.topbuy.com.au/avail/index/categorylv"); $txt = $mechx->content; while($txt=~/catalog\/product\/detail\/(.*?.jpg)/gisxm){ $related = $1.', '.$related; } print $related; }
UPDATE: I'm using perl 5.14 and HTTP::Response version is 6.01

But after running evrey time , I'm getting the error like: Missing base argument at C:/Perl/lib/HTTP/Response.pm line 93

I searched a lot for this and tried in that way too but it's giving the same error all the time.


In reply to WWW::Mechanize error: Missing base argument at C:/Perl/lib/HTTP/Response.pm line 93 by ckj

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.