My 2 cents: You need to make all your statements lowercase (i.e. CHOP, IF, PRINT, ELSE). You need to know $name is different from $NAME, so the program will not even recognize $NAME. \N needs to be \n. Case is very important in perl! I'm not even sure what \N does. Other than that, you can enable warnings by making the
#!/usr/bin/perl line
#!/usr/bin/perl -w. That will show you your errors. Someone else suggested using
chomp, so i'll put it in there too. Keep hacking away!
#!usr/bin/perl -w
print "What is your name? ";
$name = <STDIN>;
chomp($name);
if ($name eq "Randal") {
print "HELLO, RANDAL! HOW GOOD OF YOU TO BE HERE!\n";
} else {
print "HELLO, $name!\n"; #ORDINARY GREETING
}
____________________________________________
<moviequote name="Hackers">
The Plague: [...]Well let me explain the New World Order. Governments and corporations need people like you and me. We are samurai. The keyboard cowboys. And all those other people out there who have no idea what's going on are the cattle. Mooo!
</moviequote>
mexnix.perlmonk.org