$rs1->execute; if (@{$rs1->fetchrow_array}) { report_error("username_exists"); } else { report_error("username does not exist"); } #### $rs1->execute; report_error( (@{$rs1->fetchrow_array) ? "username_exists" : "username does not exist" );