in reply to prepend string to entire array

antirice's nested map is close to what I would have written, but actually what you have works for me...

~ raptor1# perl -e ' @array = qw (A B C D E F G); @array1 = qw (1 2 3 4 5 6 7); foreach $x (@array) { foreach $y (@array1) { push (@array2, $x.$y) } } print "@array2\n"; ' A1 A2 A3 A4 A5 A6 A7 B1 B2 B3 B4 B5 B6 B7 C1 C2 C3 C4 C5 C6 C7 D1 D2 D +3 D4 D5 D6 D7 E1 E2 E3 E4 E5 E6 E7 F1 F2 F3 F4 F5 F6 F7 G1 G2 G3 G4 G5 G6 G7 ~ raptor1#

Maybe you should go into more detail about how this isn't working like you wanted.


$;=sub{$/};@;=map{my($a,$b)=($_,$;);$;=sub{$a.$b->()}} split//,".rekcah lreP rehtona tsuJ";$\=$ ;->();print$/