in reply to extract data from a form .. and attach a file in sendmail

I'm confused about the $formdata transformation. If you know that you will be receiving form fields like 'email' and 'name', why not just get at them with:
$name = param('name'); $email = param('email');
Even if you don't know them, in list context CGI::param() will return the names of all of the submitted fields. You can loop over them:
foreach (param()) { $fields{$_} = param($_); }

Replies are listed 'Best First'.
RE: Re: extract data from a form .. and attach a file in sendmail
by csorensen (Beadle) on Jul 01, 2000 at 07:21 UTC
    there's alot of other stuff going on in the script that I'm not showing (since the rest of it works fine)