Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: HTML Document Comparison

by moen (Hermit)
on Sep 14, 2000 at 01:37 UTC ( [id://32372]=note: print w/replies, xml ) Need Help??


in reply to HTML Document Comparison

k, newbie answer ahead. Something like this gave me the proper answer 0||1 for equality using String::Approx. Of course not any validity against proper html code or anything, just plain text match.
use String::Approx 'amatch'; $match = amatch(@txt1, @txt2));
where @txt1 is the original document and @txt2 is the comparing document. And $match will give you 0||1 for the match.

Replies are listed 'Best First'.
RE: Re: HTML Document Comparison
by merlyn (Sage) on Sep 14, 2000 at 01:39 UTC
    Well, better would probably be String::Similarity (which I found out only recently, and right here in the Monestary) which gives a value between 0 and 1. In fact, for the original application, that might be the easiest. {grin}

    -- Randal L. Schwartz, Perl hacker

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others goofing around in the Monastery: (1)
As of 2024-04-25 04:12 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found