in reply to problem with input command

There is nothing wrong with your aproach. Just use eq to compare strings == is for numbers. You may also checkout chomp.
For more comfortable editing look at Term::Readline.
Boris