searching keys
- From: admin2@xxxxxxxxxxx (Noah)
- Date: Wed, 23 Jul 2008 20:59:15 -0700
Hi there,
I loaded a bunch of configuration lines into a hash called $Input
now I am searching the hash to make sure specific lines are there.
I want to print "NO" unless there is a match to the following ""check $ip here";
but $ip could be the range as shown below.
so a key like "check 2.2.2.2 here" would be accepted and NO would *not* be printed and if the hash has a key with "check 2 here" then a NO *would* be printed.
my $ip = "[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+";
print CHANGE "NO\n" unless exists $Input{"check $ip here"};
Cheers,
Noah
.
- Follow-Ups:
- Re: searching keys
- From: Yitzle
- Re: searching keys
- Prev by Date: Re: How to convert the date ?
- Next by Date: Re: searching keys
- Previous by thread: How to convert the date ?
- Next by thread: Re: searching keys
- Index(es):
Relevant Pages
|