in reply to Slicing a hashref

To use a hash slice, just dereference the hash like so
@$hashref{keys %some_hash} = values %some_hash;
Or to grab a single row from a database you could do this
my %data = %{$dbh->selectall_hashref()->[0]};
Of course this assumes you're only selecting one row from the database and is only really for demonstrative purposes.
HTH

broquaint