in reply to Avoiding GET in CGIs

Whenever you try to do some CGI task in Perl, you are urged to use CGI.pm (it's part of the standard distribution of newer Perls). So to avoid GETs:
use CGI; my $q = CGI->new; if ($q->request_method() eq "GET") { # do something print $q->redirect("http://somewhere.org/"); exit; }

Replies are listed 'Best First'.
RE: RE: Avoiding GET in CGIs
by Michalis (Pilgrim) on Jul 14, 2000 at 10:13 UTC
    I am using CGI.pm (actually a heavily modified version of it) but I was unaware of that function.
    Thanks for pointing that out. It looks (and probably is) better.
    It also works with parameters in the Location Bar (and not only if the form is submitted through a GET).
    The only problem I see with that is (is it really?) performance issue as you have to create the new CGI object before the check.