in reply to Re^2: Getting for() to accept a tied array in one statement
in thread Getting for() to accept a tied array in one statement

you can't bend for into an object's method.

Perl != Python

the closest to a drop in replacement is maybe a customfunction sub xfor (&&) :

xfor {@arr} sub { ...};

Cheers Rolf
(addicted to the Perl Programming Language :)
Wikisyntax for the Monastery FootballPerl is like chess, only without the dice

Replies are listed 'Best First'.
Re^4: Getting for() to accept a tied array in one statement
by perlancar (Hermit) on Apr 16, 2019 at 23:20 UTC
    Didn't hdb just do that? :-)
      and from which Perl version on? :-)

      Cheers Rolf
      (addicted to the Perl Programming Language :)
      Wikisyntax for the Monastery FootballPerl is like chess, only without the dice

        Strawberry 5.16.3 :)