Don't post html. U can mod this script to get what u want.
At 12:32 AM 11/20/2005 -0500, Scott Overstreet wrote:
># ... but now how do i get a file that has "all of the lines in "File 2"
>EXCEPT for the ones that DO match a user-ID from File 1 ?"
#!/usr/bin/perl
# show lines different between files regardless of where they are
$file1 = $ARGV[0] or die;
$file2 = $ARGV[1] or die;
open(FILE1, "$file1") or die;
open(FILE2, "$file2") or die;
while ($i = <FILE1>) {
chomp $i;
$hash1{$i} = 1;
}
while ($i = <FILE2>) {
chomp $i;
$hash2{$i} = 1;
}
foreach $i ( keys %hash1 ) {
push @notin2, "$i" unless $hash2{$i};
}
foreach $i ( keys %hash2 ) {
push @notin1, "$i" unless $hash1{$i};
}
print "Lines in $file1 but not in $file2:\n";
print join "\n", sort @notin2;
print "\n\n";
print "Lines in $file2 but not in $file1:\n";
print join "\n", sort @notin1;
print "\n";
--
REMEMBER THE WORLD TRADE CENTER ---=< WTC 911 >=--
"...ne cede malis"
00000100
_______________________________________________
Perl-Win32-Users mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs