"H.Merijn Brand" <h.m.brand@xs4all.nl> writes:
> What I was wondering, can you switch mode during while (<>) ?
>
> my $input = Iterator::Files->new;
> while (<$input>) {
> ...;
> m/some situation/ and # I want all files to come to open different
> $input->magic ("stdin");
> ...;
> }
Maybe Iterator::Files can :).
Iterator::Diamond is intended to do what <> does, but safely.
I do, however, consider adding pre/post open/close callbacks for fine
tuning. It does go way beyond the original intent, though.
-- Johan