Gossamer Forum
Home : General : Perl Programming :

string matching problem

Quote Reply
string matching problem
i have this code
Code:
$found = 'nope'; $user = 'delicia';

my (%rec2) = &array_to_hash2($_, @hits2);
if ($user eq $rec2{'Userid'}) { $found eq 'found her'; }
print qq|<p>-$rec2{'Userid'}- $found -$user-|;

which is producing the following result:
-delicia- nope -delicia-
i put the dashes around the variables to see if there were any weird characters or spaces. why doesn't the code see that the two strings are identical???


Subject Author Views Date
Thread string matching problem delicia 1167 May 7, 2020, 5:58 PM
Thread Re: [delicia] string matching problem
Andy 1148 May 7, 2020, 11:36 PM
Thread Re: [Andy] string matching problem
delicia 1143 May 8, 2020, 5:54 AM
Thread Re: [delicia] string matching problem
Andy 1140 May 8, 2020, 6:17 AM
Thread Re: [Andy] string matching problem
delicia 1138 May 8, 2020, 6:36 AM
Post Re: [delicia] string matching problem
Andy 1135 May 8, 2020, 6:39 AM