use strict; use Data::Dumper; use DBI qw(:sql_types); use Tie::IxHash; tie my %results, "Tie::IxHash"; ... connect to db .... my $stmt = qq~SELECT * FROM registrants WHERE registrant_id = ?~; %results = % { $dbh->selectrow_hashref($stmt, undef, $registrant_id) }; #### my $stmt = qq~SELECT * FROM registrants, hotels, cadavers WHERE registrants.registrant_id = ? AND registrants.registrant_id = hotels.registrant_id~; %results = % { $dbh->selectrow_hashref($stmt, undef, $registrant_id) };