in reply to Returning hash reference from a sub
Hi,
I am usually directly using references to anonymous hashes, like this:
And at the end I simply do return $row_data this is working fine for me.while ( my $row = $data_handle->fetchrow_hashref ){ my $row_data = {}; # get a fresh hash for the row data # fill in this row $row_data->{names} = $row->{'names'} || '';
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Returning hash reference from a sub
by Anonymous Monk on Mar 18, 2013 at 13:57 UTC | |
by Corion (Patriarch) on Mar 18, 2013 at 13:59 UTC | |
by tobias_hofer (Friar) on Mar 18, 2013 at 14:10 UTC | |
by Anonymous Monk on Mar 18, 2013 at 14:08 UTC | |
by Corion (Patriarch) on Mar 18, 2013 at 14:13 UTC | |
by tobias_hofer (Friar) on Mar 18, 2013 at 14:13 UTC | |
by Anonymous Monk on Mar 18, 2013 at 14:29 UTC |