if ($q->param{'field'} eq "") { # Note that 'field' has curlies now &printform() } else { &results() }