in reply to Re: Grep is changing the original list?in thread Grep is changing the original list?
@b = map { m#^(.*)\.\w+$#? $1 : $_ } @a; [download]
-- Randal L. Schwartz, Perl hacker