Selvakumar has asked for the wisdom of the Perl Monks concerning the following question:
Hi All,
I need to compare two array which has text. i have pasted the code below and i need to compare one array with another array. i have tried multiple ways but if numbers then i got result not with this text.
$inputxml='<Book><Authorgroup><Author><Surname>Lester</Surname><Forena +me>D</Forename><Suffixes>Jr</Suffixes></Author></Authorgroup><Year>20 +09</Year><Book_Title>Writing research papers</Book_Title><Edition_No> +4th</Edition_No><Publisher><Location><State>New York</State></Locatio +n><Name>Longman</Name></Publisher></Book>'; $variance='<Book><aa></aa><AuthorGroup><Author><Surname></Surname>, <F +orename></Forename>, <Suffixes></Suffixes></Author>.</AuthorGroup> (< +Year></Year>). <I><Book_Title></Book_Title></I> (<Edition_No></Editio +n_No> ed.). <Publisher><Location><State></State></Location>: <Name></ +Name></Publisher>.</Book>'; @variance_elements=$variance=~/<([^<\/]+)>/g; @inputxml_elements=$variance=~/<([^<\/]+)>/g;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: compare two string array
by Selvakumar (Scribe) on Jan 07, 2010 at 05:33 UTC |