in reply to Re^2: restriction in input
in thread restriction in input
I would handle this by just using the normal chomp($name = <STDIN>), checking its length, and then prompting the user to either accept the truncated name (eg much_too_long_name would become much_too_long_n) or to re-enter a shorter name. A simple looping prompt. You would do something similar if you were looking for a number and the user entered a string.