Change the -p to -n and add an explicit print after the next unless ....
In reply to Re: In-place file filtering by Paladin in thread In-place file filtering by princepawn