Clone of game 2048 in perl