Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

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

by dave_the_m (Monsignor)
on Apr 16, 2019 at 15:01 UTC ( #1232671=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

I don't think its possible in perl to write a function foo() that will allow any of the following in the way you want:
for (foo(list)) { ... } while (foo(list)) { .... } while (<foo(list)>) { .... }
assuming that for and while are the perl built-ins, and that you're not using source filtering or keyword plugins etc.

Dave.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (2)
As of 2019-05-22 00:33 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you enjoy 3D movies?



    Results (138 votes). Check out past polls.

    Notices?
    • (Sep 10, 2018 at 22:53 UTC) Welcome new users!