On Thu, Feb 19, 2009 at 10:20, mritorto <mrito...@gmail.com> wrote:
> owen,
>
> How do you use the List::Compare module is the same as array::compare?
snip

List::Compare can be found in CPAN*.  Here is you program rewritten to
use it (this is not what I would do):

#!/usr/bin/perl

use strict;
use warnings;
use List::Compare;

#compares directories on 2 servers
open my $atlas, "<", "atlasdirectorylisting.txt"
        or die "could not open atlasdirectorylisting.txt: $!";
open my $isis, "<", "ISISdirectorylisting.txt"
        or die "could not open ISISdirectorylisting.txt: $!";

my @atlas = <$atlas>;
my @isis  = <$isis>;

my $comparison = List::Compare->new(\...@atlas, \...@isis);

print $comparison->get_symmetric_difference;

* http://search.cpan.org/dist/List-Compare/lib/List/Compare.pm

-- 
Chas. Owens
wonkden.net
The most important skill a programmer can have is the ability to read.

-- 
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to