yitzle wrote
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 am trying to figure this out.
 when I perform the following:


there is a space at the beginning of each line printed:
        print "@lines";


there is no space at the beginning of the line:
        for $line (@lines) {
            print "$line";
        }

Cheers,
Noah

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


Reply via email to