in reply to Re^2: $_ getting clobbered by inner loop.
in thread $_ getting clobbered by inner loop.
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.
|
|---|