use autodie; my %file1; my $max = 0; my $min = 0xFFFFFFFF; # Or 0xFFFFFFFFFFFFFFFFF with 64 bit ints open my $fh1, $file1; while (<$fh1>) { chomp; $min = length if $min > length; $max = length if $max < length; $file{$file1} = 1; } open my $fh2, $file2; LINE: while (<$fh2>) { for (my $l = $min; $l <= $max; $l++) { next LINE if $file{substr $_, 0, $l}; } print; }
In reply to Re: compare two files | Help
by JavaFan
in thread compare two files | Help
by fnicholas
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |