Yaerox has asked for the wisdom of the Perl Monks concerning the following question:
which is printing values which doesn't match. The values can be alphanumeric and the database is using varchar2.my $dbval1 = ""; my $dbval2 = ""; my $val1 = ""; my $val2 = ""; if ($dbval1 eq $val1 && $dbval2 eq $val2) { print "$dbval1 = $val1 && $dbval2 = $val2\n"; }
35000970 = 35000913 && AB00035515 = 11506 35000970 = 35000914 && AB00035515 = 121475 35000970 = 35000921 && AB00035515 = 58065
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: string compare matches incorrectly
by GrandFather (Saint) on May 22, 2015 at 11:17 UTC | |
by sierpinski (Chaplain) on May 23, 2015 at 05:19 UTC | |
|
Re: string compare matches incorrectly
by marto (Cardinal) on May 22, 2015 at 09:32 UTC | |
|
Re: string compare matches incorrectly
by afoken (Chancellor) on May 22, 2015 at 09:32 UTC | |
|
Re: string compare matches incorrectly
by pme (Monsignor) on May 22, 2015 at 09:28 UTC | |
by Yaerox (Scribe) on May 22, 2015 at 09:32 UTC | |
by afoken (Chancellor) on May 22, 2015 at 11:01 UTC | |
|
Re: string compare matches incorrectly
by Discipulus (Canon) on May 22, 2015 at 09:19 UTC | |
by Yaerox (Scribe) on May 22, 2015 at 09:21 UTC |