Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re^2: string comparison

by whatluo (Novice)
on May 27, 2005 at 09:18 UTC ( #460995=note: print w/replies, xml ) Need Help??


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-

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://460995]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (3)
As of 2022-10-06 20:32 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My preferred way to holiday/vacation is:











    Results (28 votes). Check out past polls.

    Notices?