I began learning Perl yesterday. I have written this code:
print "Please type in your password.\n";
print "Password: ";
chomp($password = <>);
if ($password == "admin")
{
print "Password is correct!";
}
else
{
print "Password is incorrect!";
}
When I write "admin" it tells me that the password is correct but when I write every other password it tells me the same thing. It's like the if doesn't execute. What can I do?