Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
Please excuse its blatant corniness ;)#!/usr/bin/perl -w $secretword="llama"; print "Welcome. What is your name? "; $name= <STDIN>; chomp ($name); if ($name eq "Neil") { print "Yoooo wazzzzup, Neil! Right this way, man..."; } else { print "Hey, hold up. I'm going to need the secret password: "; $guess= <STDIN>; chomp ($guess); while ($guess ne $secretword) { Print "Wrong! Try again: "; $guess=<STDIN>; chomp ($guess); } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Newbie Help!
by turnstep (Parson) on Aug 07, 2000 at 03:19 UTC | |
|
RE: Newbie Help!
by reptile (Monk) on Aug 07, 2000 at 02:38 UTC | |
|
Re: Newbie Help!
by tilly (Archbishop) on Aug 07, 2000 at 02:35 UTC |