@ARGV = qw(file2); my %names_in_file2; while (<>) { my ($name) = split /\|/; $names_in_file2{$name}++; } @ARGV = qw(file1); $^I = ".bak"; # create backup file while (<>) { # in-place edit my ($name) = split /\|/; print unless $names_in_file2{$name}; }
-- Randal L. Schwartz, Perl hacker
Be sure to read my standard disclaimer if this is a reply.
In reply to •Re: help with lists
by merlyn
in thread help with lists
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |