Adding perl solution for Reddit Daily Programmer 172 [Easy]