foreach my $aref (@shapes[2 .. $#shapes]) { print join(" ", @$aref[2 .. $#$aref]), "\n"; }