This uses a little known, and undocumented feature in DBI, where selectall_arrayref() can be coerced into returning a reference to an array of hash references. This is done through the use of the \%attr hash reference passed to selectall_arrayref().