in reply to Is $formdata present?

I think you should consider reading the documentation of CGI. You can find it here CGI .
It will be easier for you, if you use CGI to work with forms.

``The wise man doesn't give the right answers, he poses the right questions.'' TIMTOWTDI

Replies are listed 'Best First'.
Re^2: Is $formdata present?
by Anonymous Monk on Jun 07, 2005 at 09:03 UTC
    Correct. CGi.pm will work for both POST and GET. For existence u couldd use something like..
    use CGI qw(:standard); my %formdata = (); map { $formdata{$_} = param($_); } param; if(exists $formdata{'parametername'}) {do something;}

    20050606 Janitored by Corion: Added formatting, put code in between <code>...</code> tags

      While using CGI.pm is a good thing, you still made it more complicated than it should be, at least if you ask me ...
      use strict; use CGI; my $q = new CGI; my $form = $q->Vars(); if(exists $form->{parameter_name}){ #do whatever }
      Of course, you can also use Data::FormValidator. It's suggested if you need more complicated form validation.
      And multipart-formdata encoding also, which you simply ignored.
      So what's the difference functionally between Defined and Exists? I thought Exists was used for subroutines and hashes? (clearly wrong)..
      Sorry.. I'm new. Will soon register myself and format my code. But my answer should work for you.
      Happy Coding