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


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

Try this:

sub wrapper : lvalue { tie my @x, "MyClass", @_; @x; } for( wrapper("first", "second") ) { print "In loop = "; print "$_\n"; }

As I said initially I am not expert in this, so there might be undesired side effects...

And FETCHSIZE is called once only...