$array_refb = $sth->fetchall_arrayref; while (my $ref = shift(@$array_refb)) { $yxz = shift(@$ref) ... + weitere shifts }