Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re^3: Getting for() to accept a tied array in one statement

by LanX (Saint)
on Apr 16, 2019 at 16:00 UTC ( [id://1232675]=note: print w/replies, xml ) Need Help??


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 :)

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1232675]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others perusing the Monastery: (4)
As of 2024-03-29 07:57 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found