Can I get at the parameters in my CGI program using the CGI.pm module if I am progamming an asp page run against MS IIS? The following code produces no output, I am posting a whole load of fields from a form to my asp page and was expecting this to pick up 'em up,
use CGI; sub do_work { my($query) = @_; my(@values,$key); print "<H2>Here are the current settings in this form</H2>"; foreach $key ($query->param) { print "<STRONG>$key</STRONG> -> "; @values = $query->param($key); print join(", ",@values),"<BR>\n"; } } my $query = new CGI; do_work($query);
If I use the $Request object, i.e something like ,
my($form_item) = $Request->item($field_name); $form_item = $Server->HTMLEncode($form_item);
then I get back what I'm after, but I'd prefer to use the CGI.pm module as I've seen some examples where you can easily pull the fields back into a hash table and I'd like to use it. Wired Active Perl 5.6 into IIS. Another problem is that I have to replace the print statement with a $Response->Write(...) method call. Do I have to do something to STDOUT to get print to work properly (I suspect its output is going off into the void somewhere) in an asp page?

In reply to Form parameters in CGI by eggbert

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.