tretin has asked for the wisdom of the Perl Monks concerning the following question:
and specifically (or at least I'd assume specifically)where the problem lies, in the following lines :#!/usr/bin/perl -w my $cusr; $cusr=bob; my $cpword; $cpword=pass; print "What is your username? "; $usr=<>; chomp($usr); if($usr==$cusr){ print "One moment please...\n "; print "Please enter your password:\n "; $pword=<>; chomp($pword); if($pword==$cpword){ print "One moment please...\n "; print "Authentication Complete!\n "; } } if($pword==$cpword){ open (FILE, "memberlist.txt"); while(<FILE>){ push @lines,$_; close FILE; } } else{ print "ERROR: username or password incorrect, please try again\n " +; }
That's it... and I can't seem to find the problem. Any help at all is immensly appreciated, and I ask that you please bare with me, as I am very very new to the world of Perl (and of programming on the whole) so if there's an obvious problem here please don't laugh too hard at my incompetence :).if($pword==$cpword){ open (FILE, "memberlist.txt"); while(<FILE>){ push @lines,$_; close FILE; } }
Edit: chipmunk 2001-11-04
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Variable/if question...
by mkmcconn (Chaplain) on Nov 04, 2001 at 12:24 UTC | |
|
Re: Variable/if question...
by Indomitus (Scribe) on Nov 04, 2001 at 12:17 UTC | |
|
Re: Variable/if question...
by Amoe (Friar) on Nov 04, 2001 at 16:52 UTC | |
|
Re: Variable/if question...
by danger (Priest) on Nov 05, 2001 at 15:05 UTC | |
by tretin (Friar) on Nov 07, 2001 at 08:23 UTC |