#!/usr/bin/perl use strict; use warnings; use DBI; use Data::Dumper; # t33.pl my $dbh = DBI->connect("dbi:SQLite:dbname=junk.lite","","", {PrintError => 1}) or die "Can't connect"; my $query = q{SELECT * FROM id_minutes}; my $aref = $dbh->selectall_arrayref($query, { Slice => {} }); $dbh->disconnect or die $dbh->errstr; print Dumper $aref; __END__ C:\Old_Data\perlp>sqlite3 junk.lite SQLite version 3.7.3 Enter ".help" for instructions Enter SQL statements terminated with a ";" sqlite> .mode column sqlite> .width 10 10 10 sqlite> .head on sqlite> select * from id_minutes; id month minutes ---------- ---------- ---------- maclaw796 Oct 6 hturner Oct 53 nnt Oct 3 sqlite> C:\Old_Data\perlp>perl t33.pl $VAR1 = [ { 'month' => 'Oct', 'minutes' => 6, 'id' => 'maclaw796' }, { 'month' => 'Oct', 'minutes' => 53, 'id' => 'hturner' }, { 'month' => 'Oct', 'minutes' => 3, 'id' => 'nnt' } ]; C:\Old_Data\perlp>