in reply to Re: Grep is changing the original list?
in thread Grep is changing the original list?

Uh, that's more commonly spelled m-a-p:
@b = map { m#^(.*)\.\w+$#? $1 : $_ } @a;

-- Randal L. Schwartz, Perl hacker