Doing a numeric compare vs eq string compare.
Wags ;)
-----Original Message-----
From: Martin, Greg (CSC) [mailto:[EMAIL PROTECTED]]
Sent: Monday, December 23, 2002 12:07
To: [EMAIL PROTECTED]
Subject: IF help
I haven't written any perl in awhile and am feeling quite rusty. Therefore
I'm certain this has an obvious answer. Why does this "if" always pass the
test?
$strpwd = "C0ll\@b";
@fields = split /:/,$msgtxt;
if ($fields[0] == $strpwd) {
print "got pw" . "\n";
}
else {
print "Bad pw" . "\n";
}
\\Greg Martin
Computer Sciences Corp
Collaborative Team Lead
**************************************************************************
This e-mail and any files transmitted with it may contain privileged or
confidential information. It is solely for use by the individual for whom
it is intended, even if addressed incorrectly. If you received this e-mail
in error, please notify the sender; do not disclose, copy, distribute, or
take any action in reliance on the contents of this information; and delete
it from your system. Any other use of this e-mail is prohibited. Thank you
for your compliance.
_______________________________________________
ActivePerl mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
**********************************************************
This message contains information that is confidential
and proprietary to FedEx Freight or its affiliates.
It is intended only for the recipient named and for
the express purpose(s) described therein.
Any other use is prohibited.
****************************************************************
_______________________________________________
ActivePerl mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs