in reply to Storing data into hashes
assuming you know to use DBI module, appending a sample example to do your work
my %has; my $query ="select * from table name "; my $exe = $dbh->prepare($query); $exe->execute(); while(my $data = $exe->fetchrow_hashref){ $has{$data->{firstattribute}}=$data->{secondattribute}; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Storing data into hashes
by rkrish (Acolyte) on Dec 31, 2012 at 09:55 UTC | |
by Corion (Patriarch) on Dec 31, 2012 at 10:13 UTC | |
by rkrish (Acolyte) on Dec 31, 2012 at 10:20 UTC | |
by Corion (Patriarch) on Dec 31, 2012 at 10:35 UTC | |
by roboticus (Chancellor) on Dec 31, 2012 at 10:22 UTC | |
by rkrish (Acolyte) on Dec 31, 2012 at 10:33 UTC | |
by roboticus (Chancellor) on Dec 31, 2012 at 10:37 UTC | |
by cdarke (Prior) on Jan 02, 2013 at 06:23 UTC |