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