Problem is $userboy should equal he or she, but it shows up as nothing! how do i fix it?#!/usr/local/bin/perl print "\nWhat is your name?"; $username = <STDIN>; print "\nWhere do you live?"; $userlocation = <STDIN>; print "\nHow old are you?"; $userage = <STDIN>; $userage2 = $userage++; print "\nAre you a boy or a girl?"; $usersex = <STDIN>; if ($usersex eq "boy") { $userboy = "he"; }elsif ($usersex eq "girl") { $userboy = "she"; } print "$username is $userage2 years old and lives in $userlocation" ." In a year $userboy will be $userage $username is a $usersex";
In reply to My first Script by Liam
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |