• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1881
  • Last Modified:

Perl CGI param() function not getting POST variables

I am trying to port a huge amount of code to my laptop for testing.  The live system and test systems are Perl 5.8.7 on IIS.  Until an hour ago it was going well and I could read POST variables.  I changed nothing in the configuration.  Now I cannot read POST variables using param().  This is very weird.  

I have simplified the code below.  On my live system, when I click "POST working", I see "SUBMIT: POST working".  On the test system I see only "SUBMIT:".  If I click the "GET working" button on either, I see "SUBMIT: GET working".

Any ideas?  Unfortunately, I cannot change the param() to use something like $q->param(), etc., as there are hundreds of files...
use CGI qw(:standard);
print "Content-type:text/html\n\n";
print "SUBMIT: ". param('submit');
<form method="POST" action="test.pl">
<input type="submit" name="submit" value="POST working">
<form method="GET" action="test.pl">
<input type="submit" name="submit" value="GET working">

Open in new window

  • 2
1 Solution
I don't see anything with the code that looks wrong.  What web browser are you using?  Can you try a different web browser.  Can you try shutting down, and restarting the web server?  Or rebooting the machine?
glassgiantAuthor Commented:
GAHR!  I tried in Firefox (was using IE) and it worked.  I shut down IE and restarted it.  Now it's working!
glassgiantAuthor Commented:
Thanks for the quick response.  I usually tell users to restart when weirdness happens.  I should have taken my own advice...
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Easily Design & Build Your Next Website

Squarespace’s all-in-one platform gives you everything you need to express yourself creatively online, whether it is with a domain, website, or online store. Get started with your free trial today, and when ready, take 10% off your first purchase with offer code 'EXPERTS'.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now