use strict; use warnings; use Data::Dumper; my @puzzle = qw/abcde fghij klmno pqrst uvwxy/; @puzzle = make_puzzle(@puzzle); print Dumper(\@puzzle); sub make_puzzle{ return map{[split //, $_]} @_; }