my $r = shift; # or $r = Apache->request
my %params = $r->method eq 'POST' ? $r->content : $r->args;
Also take a look at Apache::Request, which has the
same API as CGI.pm for extracting and setting
request parameters but is significantly faster, since
it's implemented in C.
|A.7. Sending Cookies in REDIRECT Responses||A.9. Sending Email from mod_perl|