# Update DB with file content my @keys = ('ID'); my $hash = $dbh->selectall_hashref("SELECT * FROM users", \@keys); print Dumper \$hash;