chomp(my $username = <>); # ... etc [download]
See chomp.
In reply to Re: Perl calling Linux commands by tobyink in thread Perl calling Linux commands by MVRS