$first = shift@ARGV; $second = shift@ARGV; open (IN, "<$first"); open (IN2, "<$second"); open (OUT, ">NACCESS"); %naccess = map { /^\s+\S+\s+\S+\s+(\S+)/; ($1 => $_) } ; close (IN2); while () { chomp; /^\s+(\S+)/; print OUT ($1) unless (exists($naccess{$1})); } close (IN);