----- Original Message ----- From: "Hardy Merrill" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Thursday, January 22, 2004 11:21 AM Subject: Re: Strange matching problem...
> HM>> I don't see any matching logic in your code below, but here's a > general thought - instead of a string equality check ( if ($acct1 eq > $acct2) ), you could use a regular expression with the "i" (ignore case > flag) something like ( if ($acct1 =~ /$acct2/i ) > Sorry, that this is a bit off topic but couldn't resist... This is for the (hopefully small) percentage of readers that are not fluent in "regular expressions", and might use this advice in the future. A better check would be add the anchors ^,$ if ($acct1 =~ /^$acct2$/i) { #do something } In order to get an exact character match. Otherwise you are checking to see if $acct2 is a subset of $acct1. For example the two strings $acct1 = "XABCX"; $acct2 = "abc"; would match without ^,$