shunting yard perl implementation