in reply to Re: Comparing two file in Arrays
in thread Comparing two file in Arrays

true. comm is also a good way to do that. Looping through the text file gives the added advantage of being able to discriminately direct the text based on matches, which would otherwise need multiple incantations of comm. Thanks for pointing me to the readme, I think those methods ought to do it for me.

Replies are listed 'Best First'.
Re: Re: Re: Comparing two file in Arrays
by tachyon (Chancellor) on Jan 03, 2004 at 04:40 UTC

    Algorithm::HowSimilar is probably the fastest solution but only because it uses the excellent Algorithm::Diff module.

    use Algorithm::HowSimilar 'compare'; my ( $av_similarity, $sim_ary1_to_ary2, $sim_ary2_to_ary1, $ref_ary_matches, $ref_ary_in_ary1_but_not_ary2, $ref_ary_in_ary2_but_not_ary1 ) = compare( \@ary1, \@ary2 );

    cheers

    tachyon