in reply to Re: best way to implement multiple foreach iterator variables?
in thread best way to implement multiple foreach iterator variables?
I like List::MoreUtils natatime for this sort of task:
use List::MoreUtils qw( natatime ); my $next_two = natatime 2, @x; while ( my ( $x, $y ) = $next_two->() ) { # do something with $x & y };
|
|---|