Sort of repost and something that was discussed earlier in the CB..

I have a small www::mech script that I'm trying to get to work on my web site (CGI). It works in command line just fine but as CGI on my web it it continually reloads infinately and oddly enough it appends my URL into the current URL (who knows why.).

It turns http://spydersubmission.com/cgi-bin/lyrics.pl (this is the real link)
Into http://spydersubmission.com/?http://spydersubmission.com/cgi-bin/lyrics.pl

Someone in the CB said it was working fine as CGI for them. So what could the problem be?

The module wasn't there this morning so I had to download, make a lib and upload. So I thought that's what the problem was. The web host just installed downloaded and installed it themselves and it's still doing the same monkey business.

Can anyone explain this mystery? Does it work on your web server?

#!/usr/bin/perl use warnings; use strict; use CGI qw/:standard/; use CGI::Carp qw(fatalsToBrowser); my $url = "http://www.letssingit.com/frame_menu.html"; my $query = "avril"; use WWW::Mechanize; my $mech = WWW::Mechanize->new(agent=>"wonderbot"); $mech->get($url); print header, start_html("lyrics grabber"); $mech->submit_form( form_name => 'search', fields => { s => $query, l => 'song', # or 'artist' or 'albu +m' or 'lyrics'. }, ); my $content = $mech->content; print $content;

In reply to www::mechanize reloading page by spyders

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.