my @lists = ( [ 1, 2 ], [ qw[ a b ] ], [ qw[ # * & ] ] ); nFor { print join '', map $lists[ $_ ][ $_[ $_ ] ], 0 .. $#_; } map scalar @$_, @lists;