While there are aspects of your Perl that I'd recommend changing to a more modern style, the cause of the problem doesn't spring out at me. I'd suggest putting some extra diagnostics in the loop that might help you see what's happening:
# next if $username ne $user; if ($username ne $user) { print "<P>user '$user' didn't match '$username'</P>"; next; } # $good = 1 if $username eq $user and $password eq $pass; print "<P>matched username '$user'</P>"; if ($password eq $pass) { print "<P>.. and matched password, marking as good</P>"; $good = 1; } else { print "<P>.. but password '$pass' didn't match '$password'</P> +"; }
In reply to Re: amateur at Perl need helpwith small script
by hv
in thread amateur at Perl need helpwith small script
by jpys
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |