in reply to My first Script

To the above answers, I wanted to add this advice: use a subroutine to ask the questions and do the chomping. If you have a subroutine that asks the question, then returns the result, the code will be cleaner. So, summarizing the above advice:
#!/usr/local/bin/perl $username = ask_user("What is your name?"); $userlocation = ask_user("Where do you live?"); $userage = ask_user("How old are you?"); $userage2 = $userage++; $usersex = ask_user("Are you a boy or a girl?"); $userboy = get_gender($usersex); print "$username is $userage years old and lives in $userlocation" ." In a year $userboy will be $userage2 $username is a $usersex"; sub ask_user { my ($question) = @_; print "\n$question "; my $answer = <STDIN>; chomp($answer); $answer; } sub get_gender { my ($usersex_in) = @_; my $usersex = lc($usersex_in); if ($usersex eq "boy") { return "he"; } elsif ($usersex eq "girl") { return "she"; } else { return "it"; } }

Hope that was helpful.