in reply to help with lists
@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.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: help with lists
by Anonymous Monk on Mar 27, 2004 at 22:58 UTC |