#!/usr/bin/perl use warnings; use strict; my $tmpdata = 'tmpdata'; my $DestDevice = 'Box'; my %data; while ( <DATA> ) { chomp; $data{ $_ } = 1; } open my $TMPDATA, '<', $tmpdata or die "Cannot open '$tmpdata' because +: $!"; while ( <$TMPDATA> ) { next if /^(?:$|sh|\s*Source|$DestDevice|Accounting)/; my @fields = split; next if $data{ $fields[ 1 ] }; print join( "\t", @fields ), "\n"; } close $TMPDATA; exit 0; __DATA__ 10.2.9.2 10.2.9.3 10.2.9.6
In reply to Re: Trying to get the complete opposite end results
by jwkrahn
in thread Trying to get the complete opposite end results
by mlebel
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |