decode -- join "\n" => map {join " " => map {shift @$_} @_} @{$_ [0]}

0 views
Skip to first unread message

rak_perl

unread,
Apr 16, 2014, 6:10:59 PM4/16/14
to unix-and-perl-...@googlegroups.com

I am new to Perl. Appreciate if someone can explain what the following function is doing.

sub zup { 
    join "\n" => map {join " " => map {shift @$_} @_} @{$_ [0]} 
} 


my @array1 = qw /ab bc cd de/; 
my @array2 = qw /cc dd ee gg/; 
my @array3 = qw /12 34 56 78/; 

print zup \(@array1, @array2, @array3); 
print "\n"; 

__END__ 
ab cc 12 
bc dd 34 
cd ee 56 
de gg 78
Reply all
Reply to author
Forward
0 new messages