DBI, fetchall_arrayref, and the Slice option as Slice => {}:
use strict; use DBI; use Data::Dumper; my $dbh = DBI->connect(..., { RaiseError => 1, PrintError => 0 }); my $sql = <<SQL; SELECT * FROM mytable SQL my $sth = $dbh->prepare($sql); my $res = $sth->fetchall_arrayref({ Slice => {} }); print Dumper $res;
In reply to Re: Representing a table in an array?
by Corion
in thread Representing a table in an array?
by DreamT
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |