Hi All,
Whats the easiest way to remove duplicate entries from an array. Below is a
script that removes ip addresses from a log file and adds them to an array.
I then check the array to see if the value is already present and if it is i
set a flag($exists) and then push that value into the array
On Fri, 20 Sep 2002, Griggs Rob wrote:
> Hi All,
>
> Whats the easiest way to remove duplicate entries from an array. Below is a
> script that removes ip addresses from a log file and adds them to an array.
> I then check the array to see if the value is already present and if it is i
> set a fl
How about..
if(/\[(\d+\.\d+\.\d+\.\d+)\].+reject=550/) {
$IP{$1}++;
}
the your array of unique IPs is just keys %IP
R
At 14:14 20/09/2002 +0100, Griggs Rob wrote:
>Hi All,
>
>Whats the easiest way to remove duplicate entries from an array. Below is a
>script that removes i