Anyway, patronising over...
If your form uses method='GET' then parameters will be stored in
$ENV{QUERY_STRING}, in the format firstname=John&lastname=Doe&display=Doe%2C+John(same as you see in URL's).
If your form uses method='POST' then input will be stored in a string in the same format, but fed into STDIN instead. The length is
$ENV{CONTENT_LENGTH} bytes, so read( STDIN, $postData, $ENV{CONTENT_LENGTH}). You'll need to unescape the output, and also change '+' into ' '.
I have used it on occasion as I can't work out how to process multipart forms for file uploads.
As you said, personal preference, but either way works.
[perlmonks.org...]
I couldn't get the article about file uploads unfortunately, it 404ed.
Thanks again for the info.
Back to the point though, Plum please let us know how you get on.
You are right, but if you look at the source code of the CGI module (or other modules) I'll bet you can learn a thing or two and incorporate that into your own code. Like how to parse multi-valued form fields:
'SplitParam' => <<'END_OF_FUNC',
sub SplitParam {
my ($param) = @_;
my (@params) = split ("\0", $param);
return (wantarray? @params : $params[0]);
}
END_OF_FUNC