Localizing $_ in a while loop would cause any changes to that variable to mysteriously be lost when you exit the while.
Code should not mess around with things that are not its concern, since that would generate unintended and unexpected side effects. The while loop does not inherently use $_, so therefore it should not localize or otherwise muck up $_.
The same reasoning would explain why a while loop does not automatically localize @test_files as well.
In reply to Re^3: $_ getting clobbered by inner loop.
by SuicideJunkie
in thread $_ getting clobbered by inner loop.
by dbanas
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |