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


in reply to <> operation with pipes

You should add an exit statement in the end of the loop.