$uploaded_file = param('upload'); if (!$uploaded_file && cgi_error()) { print header(-status=>cgi_error()); # <== change this line exit 0; }