in reply to Grep is changing the original list?

excellent help - thanks alot everyone. i've switched to a for with pushes instead:

push @b,(m|^(.*)\.\w+$|)?$1:$_ for(@a);

The reason i'm using the assignment operator (and i did mean to) is so that files without an extension get left in as is (Note the ? operator). I'm guessing there must be a better (faster) way to do this though? Thanks.

Replies are listed 'Best First'.
Re: Re: Grep is changing the original list?
by merlyn (Sage) on Apr 17, 2001 at 21:00 UTC