in reply to Problem with passing array in a sub
@a = permutations(@{ $test[2] }); [download]
See perllol - Manipulating Arrays of Arrays in Perl for details.