http://www.perlmonks.org?node_id=1008322


in reply to Re^2: Removing blank/empty lines
in thread Removing blank/empty lines

Make sure you put it inside the loop. The "{ }" brackets contain everything that's inside of your loop.