Perl6::Take is a Perl module to gather/take in Perl 5.
SYNOPSIS
use Perl6::Take;
my @foo = gather {
take 5;
};
EXPORT
gather
Accepts a block. take statements inside the dynamic scope of the block are used to accumulate a list, which is gathered as the return value of the block.
take
Accumulates its argument (or list of arguments) on to the nearest gather in the dynamic scope. Arguments are evaluated in list context. The arguments may be passed on to a variable, but note that this assignment should usually be done in list context, as per usual context rules:
$answer = take 42; # 1
($answer) = take 42; # 42
Product's homepage
Requirements:
· Perl