in reply to Making hashes from arrays

building on the fine work by nite man here is something that deaks with your initial array of hall_ids too. i use @constrings here for clarity not efficiency, or memory management...

# presume dbh hunky dory my @hall_ids = ("slumber1", "slumber2", "slumber3"); my %hall_details; my @constrings = map { "select hall_name, upload_date, uploaded_by, photo_id " . "from hall_details where hall_id='$_' limit 1;" } @hall_ids; map { my $sth = $dbh->prepare($constring[$_]); $sth->execute(); $halldetails{$hallid[$_]} = $sth->fetchall_arrayref(); $sth->finish(); } (0 .. $#hallids);
...wufnik

-- in the world of the mules there are no rules --