($small_file, $big_file) = @ARGV; open SMALL, $small_file; while(<SMALL>) { $id_to_remove=$_; chomp $id_to_remove; $hash_to_remove{$id_to_remove} = $id_to_remove; } close SMALL; open BIG, $big_file; while(<BIG>) { $id_to_check=$_; chomp $id_to_check; if(not exists $hash_to_remove{$id_to_check}) {print $id_to_check."\n";} } close BIG;
In reply to Re^4: a one-liner for this trivial problem?
by Anonymous Monk
in thread a one-liner for this trivial problem?
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |