$myvariable = $q->param( "myinput" ) || ""; if ($myvariable eq "") { # no warnings }