in reply to problem with fetchall_arrayref

I'm guessing you don't have a column named "Slice". As I read the docs, using a non-empty hash reference tells it to return only the columns named in the hash--Slice, in this case. Perhaps you meant to return all rows as hashes containing all columns like this:

my $rows = $sth->fetchall_arrayref( {} );

...roboticus

When your only tool is a hammer, all problems look like your thumb.