Note that, because $_ is a reference into the list value, it can be used to modify the elements of the array.
Perhaps you meant $_=~rather than $_= ? (Your script seems to work as you intended by adding the tilde :)
In reply to Re: Grep is changing the original list?
by kschwab
in thread Grep is changing the original list?
by iamcal
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |