RE: array and hash patter matching

2007-05-08 Thread Tim Wolak
John, Below are ansewers to your questions. -Original Message- From: John W. Krahn [mailto:[EMAIL PROTECTED] Sent: Monday, May 07, 2007 12:57 PM To: Perl Beginners Subject: Re: array and hash patter matching Tim Wolak wrote: > Morning all, Hello, > I am working on a script that

Re: array and hash patter matching

2007-05-07 Thread Rene Schickbauer
> Morning all, > > I am working on a script that reads in /var/log/auth.log,, takes the ip > addresses puts them into a hash keeping track of how many times it finds > that address and compare it to addresses found in /etc/hosts.deny and > only write the addresses that are new in the file. So far

Re: array and hash patter matching

2007-05-07 Thread John W. Krahn
Tim Wolak wrote: > Morning all, Hello, > I am working on a script that reads in /var/log/auth.log,, takes the ip > addresses puts them into a hash keeping track of how many times it finds > that address and compare it to addresses found in /etc/hosts.deny and > only write the addresses that are n

Re: array and hash patter matching

2007-05-07 Thread Tom Phoenix
On 5/7/07, Tim Wolak <[EMAIL PROTECTED]> wrote: however I am struggling on how to compare the hash with an array for any duplicate addresses. What is the best approach to take with this? You want to know whether a given IP address matches any of a list of IP addresses, right? Probably I'd use