in reply to Re^2: a one-liner for this trivial problem?
in thread a one-liner for this trivial problem?

You can do that in one line. The easiest way is to use a really long line and to fill that line by removing all line breaks from the script.

Maybe you can show us the code you've already written to solve the problem. Then we can help you with the technical hurdles that might prevent that code from working as a one-liner.

  • Comment on Re^3: a one-liner for this trivial problem?

Replies are listed 'Best First'.
Re^4: a one-liner for this trivial problem?
by Anonymous Monk on Apr 16, 2013 at 14:54 UTC
    Something like this...
    ($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;