I think you don't really mean 'in a command line', but more 'through a text menu', if I understand you correctly. (At least, not through the normal understanding of 'command line', whether it is accurate or not.)
Take a look at Term::UI, Term::Menu, and IO::Prompt. I think those do what you are looking for.
In reply to Re: User input from a command line by giving options a,b,c
by DStaal
in thread User input from a command line by giving options a,b,c
by mgrangeiro
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |