in reply to Getting for() to accept a tied array in one statement

Never used tie before, so this is a good learning experience, even though like LanX I do not know either what this is good for. In any case, I think, this works as required:

for( @{ tie my @x, "My::Class", "first", "second"; \@x } ) { print "$_\n"; }