Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re^2: string comparison

by whatluo (Novice)
on May 27, 2005 at 09:18 UTC ( [id://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?Last hourOther CB clients
Other Users?
Others browsing the Monastery: (4)
As of 2024-04-24 03:19 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found