I am trying to do a search via the www::search module using alltheweb as the search engine however I am trying to do the search in polish, which the option for the polish language is specified as l=pl in the query string ie the full query string using alltheweb is
http://www.alltheweb.com/search?advanced=1&cat=web&jsact=&_stype=norm& +type=all&q=%22Telewizja+Polska%22&itag=crv&_b_query=&l=pl&ics=utf-8&c +s=utf8&wf%5Bn%5D=3&wf%5B0%5D%5Br%5D=%2B&wf%5B0%5D%5Bq%5D=&wf%5B0%5D%5 +Bw%5D=&wf%5B1%5D%5Br%5D=%2B&wf%5B1%5D%5Bq%5D=&wf%5B1%5D%5Bw%5D=&wf%5B +2%5D%5Br%5D=-&wf%5B2%5D%5Bq%5D=&wf%5B2%5D%5Bw%5D=&dincl=&dexcl=&geo=& +doctype=&dfr%5Bd%5D=1&dfr%5Bm%5D=1&dfr%5By%5D=1980&dto%5Bd%5D=18&dto% +5Bm%5D=1&dto%5By%5D=2006&hits=10&nooc=off
however the query doesn't go through. I am somewhat confused as to how to implement the l=pl restriction having a look at the google api the equivalent which I have drawn my inspiration from I think would be something like:
my $search = WWW::Search->new('Google', key => $key, restrict => $lang +uage_code);
where $language_code = "lang_pl"; Here so far is my code
#! Perl\bin\perl; use WWW::Search; my $language_code="l=pl"; $query = "Telewizja Polska"; $search = new WWW::Search('AlltheWeb', restrict => $language_code); $search->native_query(WWW::Search::escape_query($query)); $search->ma +ximum_to_retrieve(100); while (my $result = $search->next_result()) { $url = $result->url; $title = $result->title; $desc = $result->descrip +tion; print $result->url, "\n"; print "<a href=$url>$title</a> $source<br>$date<br>$desc<p>\n"; }

Edit: g0n - code tags round long url


In reply to searching via www::search on alltheweb by coder45

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.