in reply to Re: Changing data output
in thread Changing data output

grep is not a good solution for this problem. grep modifies the list in-place, then makes a copy for @paths. You end up with two (hopefully)* identical arrays.

*If the match fails, that element will not be returned by grep, so will not be in @paths!