Just another Perl shrine | |
PerlMonks |
Re: Passing a hash between subsby physi (Friar) |
on Jan 30, 2003 at 18:45 UTC ( [id://231407]=note: print w/replies, xml ) | Need Help?? |
In bar(), $idand $location, which fills your %location hash, are values and no references to anything. I think that they are the values from coloum 'id' and 'location' from your database !!!
So if you want to get the location for i.e. id=4 you have to write $location{4} There's also a $dbh->selectall_hashref() possibility, but I can't figure out, how it works ;-) Maybe perlodoc DBI can help ? Hope this helps ?
In Section
Seekers of Perl Wisdom
|
|