in reply to Simple if Statement Not Acting Right?
#!/usr/bin/perl -w use strict; my %usernameInfo; my $password = "phaEdrus3"; my $username = "Tony Barbieri"; $usernameInfo{$username} = $password; if ( $password eq $usernameInfo{$username} ) { print "match\n"; } else { print "no match\n"; }
So I would suggest that you will need to chomp the values that are either being inputted or being read from your flat file so as to remove the carriage returns (\n's).
cheers,
Anth
|
|---|