my $stmt = "SELECT * FROM users WHERE username = ?"; my %userdata = % { $dbh->selectrow_hashref($stmt, undef, $user_name) };