Noah

Untested code.

# Always...
use strict;
use warnings;

my %ip = ...;

#Get the lines as an array.
my @lines = keys %ip;

# Slight modification to the regex. Someone else's reply will probably
have a more elegant method.
my $ipSearch = qr/[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}/;

# Use variables for filehandles.
open my $CHANGE, "> $changeFile" or die;
print CHANGE "NO\n" unless ( grep ( $ipSearch, @lines ) );



Hi there,

okay I have a strange issue. all the lines as part of "my @lines = keys %ip;" have a space at the beginning of the line of each key.

cheers,

Noah

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/


Reply via email to