Итак, этот вопрос предназначен исключительно для учебных целей и любопытства, но может ли кто-нибудь объяснить, как работает эта функция ниже?
sub mesh (\@\@;\@\@\@\@\@\@\@\@\@\@\@\@\@\@\@\@\@\@\@\@\@\@\@\@\@\@\@\@\@\@) {
my $max = -1;
$max < $#$_ && ( $max = $#$_ ) foreach @_;
map {
my $ix = $_;
map $_->[$ix], @_;
} 0 .. $max;
}
Он из модуля List::MoreUtils. Я использую его в одном из своих приложений, и мне довелось увидеть исходный код, и это заставило меня почувствовать, что я совсем не знаю перла! Может ли кто-нибудь объяснить это безумие?:) Спасибо!