in reply to Re: string comparison
in thread string comparison

Hi, Robartes

There is a bug in your code, we should check the number of
keys before we do the for loop, cause if I change the $strings to
my @strings=("ss,~cake,pastry","pastry,~cake","cake,pastry");

It'll output :String 1 matches 0!
---

just my 2 cents,
thanks,
huajian

Replies are listed 'Best First'.
Re^3: string comparison
by robartes (Priest) on May 27, 2005 at 09:51 UTC

    You're right - thanks. I've updated my code to check both hashes for leftover keys, which should catch that problem.

    CU
    Robartes-