The most obvious reason that your script does nothing is because you mix up single quotes with backticks ( actually executes the command ).
Also you should chomp your userinput, otherwise you also pass an ending newline in the next command.
I strongly recommend, that you look at some bootstrapping perl tutorial e.g. perlintro.