#!/path/to/perl -w use strict; my $uname; my $passwd; print "username:"; chomp($uname = ); #catch stdin, get rid of trailing newline print "Your Username is: $uname"; #print it out print "password:"; chomp($passwd = );