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


in reply to Is There A Better Way?

There are also other answers in this recent thread on essentially the same question.