in reply to Recieving data in the body

If you're reading the data from STDIN, then this implies that you have a broken CGI parser. Generally from the perspective of your program, you should not care whether or not the data is coming via a POST or a GET.

You might want to check out my CGI course, particularly Lesson 2, which explains why hand-rolled parsers are usually broken.

The easiest way to deal with your problem is to use CGI.pm. For example, if the message is in a textarea named "message", you can read it with the following:

use CGI qw(:standard); my $message = param('message');

Pretty simple, eh? :)

Cheers,
Ovid

New address of my CGI Course.
Silence is Evil (feel free to copy and distribute widely - note copyright text)

Replies are listed 'Best First'.
Re: Re: Recieving data in the body
by tcf22 (Priest) on May 19, 2003 at 16:12 UTC
    I've used the cgi module to recieve simple data sent in a get or a post. The cgi script that I am writing is just for testing to see if the data is correct.

    The spec that I am writing for says the data I send shouldn't be sent as a set of key value pairs, but actually in the body of the message. Maybe I'm misinterpreting what they want sent.

    Is there a CGI function that will handle this? Anytime I've ever sent anything to a script(through LWP, etc.) I always have sent key value pairs.