in reply to Dealing with uninitialized values

Try
my $sql = "SELECT * FROM users WHERE id = ?"; my $statement = $db_handle->prepare($sql) or die "Couldn't prepare query '$sql': $DBI::errstr\n"; $statement->execute($user) or die "Couldn't execute query '$sql': $DBI::errstr\n";
If you really want to have $user in a string then you can add
$user ||= '';
In your code before you use it.
-- gam3
A picture is worth a thousand words, but takes 200K.