Read the advice you got in your previous post about using chomp when reading input input from users.
In reply to Re: Perl calling Linux commands by marto in thread Perl calling Linux commands by MVRS