use CGI::Minimal; binmode STDIN; # only do that if you want file-uploads to work my $cgi = CGI::Minimal->new;