in reply to comparing two arrays
use Fatal qw/open/; my %h; open my $fh, '<', '/tmp/file1'; while ( defined ($_ = <$fh>)){ /^([\d.]+)/ and $h{$1}++; } open $fh, '<', '/tmp/file2'; while ( defined ($_ = <$fh>)){ /^([\d.]+)/ and delete $h{$1}; } print join "\n", keys %h;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: comparing two arrays
by GrandFather (Saint) on Oct 20, 2005 at 18:16 UTC | |
by borisz (Canon) on Oct 20, 2005 at 18:50 UTC | |
|
Re^2: comparing two arrays
by Anonymous Monk on Oct 20, 2005 at 10:41 UTC |