weglarz has asked for the wisdom of the Perl Monks concerning the following question:

Hello Perl Monks! I am writing a simple gatekeeper program with a few subroutines. This one I am having trouble with always returns "pass", even though it seems as if the logic is sound. Thanks!

sub entersys { print("Please enter your username: "); chop($euser = <STDIN>); print("Please enter your password: "); chop($epass = <STDIN>); if($userpass{$euser} eq $epass) { $x = 'pass'; } else { $x = 'fail'; } }