$query = new CGI;
This will parse the input (from both POST and GET methods) and store it into a perl5 object called $query.