Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re: Trying to get the complete opposite end results

by jwkrahn (Abbot)
on Feb 15, 2012 at 21:13 UTC ( [id://954075]=note: print w/replies, xml ) Need Help??


in reply to Trying to get the complete opposite end results

#!/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

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://954075]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others pondering the Monastery: (9)
As of 2024-04-23 07:47 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found