lampros21_7 has asked for the wisdom of the Perl Monks concerning the following question:
%string_1 = map{$_ =>1} @string1; @intersection_of_the_2_arrays = grep( $string_1{$_}, @string2 ); $number_of_similar_words = scalar(@intersection_of_the_2_arrays);
Thanks for viewing and for anyone who can help.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Comparing two arrays
by NetWallah (Canon) on Feb 25, 2006 at 17:48 UTC | |
|
Re: Comparing two arrays
by sk (Curate) on Feb 25, 2006 at 17:50 UTC | |
|
Re: Comparing two arrays
by leocharre (Priest) on Feb 25, 2006 at 19:38 UTC | |
|
Re: Comparing two arrays
by ayrnieu (Beadle) on Feb 25, 2006 at 22:23 UTC |