in reply to output question

By omitting the <code> tags, you put your question in one line. See Markup in the Monastery for details.

When the user enters a number, he finishes with an Enter. This Enter is part of the $number, you can remove it with chomp.

لսႽ† ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ