http://qs321.pair.com?node_id=518375


in reply to Re^5: Spot the bug
in thread Spot the bug

The each iterator is not unlike the behaviour of a filehandle where you are reading line by line. Perhaps you find that iterator non-obvious as well, and you prefer to do
my @lines = <$file_handle>; for my $line (@lines) { ... }
but I bet people will comment on that if you start promoting that style on Perlmonks.

I find iterators bind to the data they act on far more natural than being binded to the location in the source code. It translates to an OO approach much more naturally.

Perl --((8:>*