sub slurp { local *ARGV; @ARGV = @_; <> } my %where; $where{$_} .= "1" for slurp($file1); $where{$_} .= "2" for slurp($file2); for (sort keys %where) { my $where = $where{$_}; if ($where =~ /12/) { print "both"; } elsif ($where =~ /1/) { print "left"; } else { print "right"; } print ":\t$_"; }
In reply to Re: Comparing 2 files without diff or compare
by merlyn
in thread Comparing 2 files without diff or compare
by ilottl
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |