On Wed, May 16, 2001 at 09:58:39AM -0500, Craig S. Cottingham wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> On 2001-05-16 9:43, Ken Williams at [EMAIL PROTECTED] wrote:
> 
> > To simplify, avoid the chomping:
> 
> That assumes that either both files have a newline on the last line,
> or don't and the last lines are equal.
> 

Use -l for the best of all worlds:

#!perl -li.bak

open REMOVE, 'remove' or die "Cannot open 'remove': $!";
while(<REMOVE>) { $remove{$_} = 1 }

@ARGV = 'master';
while(<>) { print unless exists $remove{$_} }


Ronald

Reply via email to