[]);
push @{ $cond->($_) ? $a : $b }
for @$arr;
($a, $b)
}
use Data::Dumper;
warn Dumper [split_on_cond([1..10], sub($v) {$v > 6})];
Useless use of push with no values at script.pl line 13. $VAR1 = [ [], [] ]; https://PerlBanjo.com/47000f7a54
Обсуждают сегодня