I'm starting a simple script that submits data to some of the lower-end search engines that don't have image codes and all that.

I decided putting the information for each engine in a txt file (see below) would be easiest as I can update information in the future without touching the script itself.

NAME SUBMIT_URL FORM_ACTION FORM_NAME FORM_PARAMS HIDDEN_PARAMS S +UCCESS_TXT Aesop::http://www.aesop.com/cgi-bin/aesopadd.cgi::GET::1::EMAIL,URL::N +AME,terms=yes,VERIFIER=072-58::Thank you for using Amidalla::http://www.amidalla.com/add.htm::POST::1::addurl::::thank yo +u for
I just got stumped. I'll be passing a $url, $email, etc to all these engines but each engine calls it something else. So how would I know what variable the URL is supposed to go into if it's not 'url'? It could be V_add, url, URL, pageurl, webaddy, etc.

I can't think of ANY way to do that unless I did so in the txt file.

NAME SUBMIT_URL FORM_ACTION FORM_NAME FORM_PARAMS HIDDEN_PARAMS S +UCCESS_TXT Aesop::http://www.aesop.com/cgi-bin/aesopadd.cgi::GET::1::EMAIL=$email +,URL=$url::NAME=$name,terms=yes,VERIFIER=072-58::Thank you for using Amidalla::http://www.amidalla.com/add.htm::POST::1::addurl=$url::::tha +nk you for
Now I think this would work. I could also setup a mysql database, too, which I flirted with for a few minutes. Then I thought that using Mysql to parse all the data (and then splitting some of the fields anyway) would be a bit slower than this text file, and less managable.

One last question. Occassionally there will be one checkbox for an acceptance of terms and the check has a value. Do I have to care what the value is or will www::mechanize click it anyway?

Thanks!


In reply to passing along fields to www::mechanize by coldfingertips

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.