in reply to Re^3: Closure producing 'Modification of read-only value' error
in thread Closure producing 'Modification of read-only value' error

map, grep, for etc do the right thing.

The magic while construct does not make $_ and alias - it assigns to it. This is fundamentally different. That said, it bugs me that it doesn't do implicit localization.