Meanwhile in a moduleuse FTest; my $test = new FTest (); print foreach $test->foo; print for $test->foo;
That code prints "11". I you were correct that would be an endless loop.package FTest; sub new { return bless {}, shift; } sub foo { return 1; } 1;
In reply to Re^4: sub that sets $_
by holli
in thread sub that sets $_
by holli
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |