For Programmers: Free Programming Magazines  


Home > Archive > PERL Beginners > June 2007 > compare two arrays









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author compare two arrays
Andreas Moroder

2007-06-21, 3:59 am

Hello,

I have two arrays with strings and I have to find out the differences
between this arrays. Is a perl function available that does this ?

Thanks
andreas

John

2007-06-21, 3:59 am


"Andreas Moroder" <andreas.moroder@sb-brixen.it> wrote in message
news:f5d10c$f5b$1@sea.gmane.org...
> Hello,
>
> I have two arrays with strings and I have to find out the differences
> between this arrays. Is a perl function available that does this ?
>
> Thanks
> andreas
>


The Perl module Array::Compare will tell you whether the arrays are the same
or different but not what the differences are.

Regards
John


Jeff Pang

2007-06-21, 3:59 am

Andreas Moroder 写道:
> Hello,
>
> I have two arrays with strings and I have to find out the differences
> between this arrays. Is a perl function available that does this ?
>


Hello,
You may try this module:
http://search.cpan.org/~typester/Ar...b/Array/Diff.pm
John W. Krahn

2007-06-21, 3:59 am

Andreas Moroder wrote:
> Hello,


Hello,

> I have two arrays with strings and I have to find out the differences
> between this arrays. Is a perl function available that does this ?


perldoc -q "How do I compute the difference of two arrays"



John
--
Perl isn't a toolbox, but a small machine shop where you
can special-order certain sorts of tools at low cost and
in short order. -- Larry Wall
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com