Dear Monks,

I am sure there is a simple command for this, but my google-fu is failing me. I would like to write a perl script that does a LWP request on a cgi page. To do so, I need the parameters, and sloshing through the HTML to figure out the parameters is hurting my head. Is there a simple command where I can feed a url to it, and it will spit out all the possible parameters that can be passed for the request?

Specifically I am looking to script this site:
http://www.bioinformatics.nl/cgi-bin/primer3plus/primer3plus.cgi

Getting the check boxes and input sequence.

Thanks in advance!

Here is the initial code, that posts the results on the page, but does not submit them:

Updated with failed code

Rather I should say that the result of this file, is the original webpage with the variables as given by the code, but the code does not press the "Pick Primers" button....

#!/usr/bin/perl use LWP::UserAgent; $ua = LWP::UserAgent->new; $ua->agent("Mozilla 8.0"); use HTTP::Request::Common qw(POST); my $req = (POST 'http://www.bioinformatics.nl/cgi-bin/primer3plus/prim +er3plus.cgi', ["SEQUENCE" => "AATGAGTTAATAGAATCTTTACAAATAAGAATATACACTTCTGCTTAGGATGAT +AATTGGAGGCAAGTGAATCCTGAGCGTGATTTGATAATGACCTAATAATGATGGGTTTTATTTCCAGAC +TTCACTTCTAATGGTGATTATGGGAGAACTGGAGCCTTCAGAGGGTAAAATTAAGCACAGTGGAAGAAT +TTCATTCTGTTCTCAGTTTTCCTGGATTATGCCTGGCACCATTAAAGAAAATATCATC[C]GGTGTTTC +CTATGATGAATATAGATACAGAAGCGTCATCAAAGCATGCCAACTAGAAGAGGTAAGAAACTATGTGAA +AACTTTTTGATTATGCATATGAACCCTTCACACTACCCAAATTATATATTTGGCTCCATATTCAATCGG +TTAGTCTACATATATTTATGTTTCCTCTATGGGTAAGCTACTGTGAATGGATCAATTAATAAAACACAT +GACCTATGCTTTAAGAAGCTTGCAAACACATGAAA", "SCRIPT_DETECTION_PICK_LEFT" => "checked", "SCRIPT_DETECTION_PICK_RIGHT" => "checked" ]); $request = $ua->request($req); $content = $request->content; open(OUTPUT,">output_here.html"); print OUTPUT "$content"; close(OUTPUT); exit;

In reply to Getting all the parameters of CGI request by drblove27

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.