I use this subroutine for uniq
sub uniq
{
my @in=@_;
my (%saw,@out);
undef %saw;
@out = grep(!$saw{$_}++, @in);
return @out;
}
Unfortunately, I have no idea how it works.
Regards,
Agustin Rivera
Webmaster, Pollstar.com / PollstarOnline.com
----- Original Message -----
From: "Craig Hammer" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, May 23, 2002 7:18 AM
Subject: uniq
> I am working on a script to read in a firewall logfile, pull out the IP
> addresses of denied packets, then give me a count per IP address, and
> perform a whois on each address.
>
> This previously ran as a VERY SLOW shell script. In bourne, I used sort
and
> then uniq to get a count per IP address. Is there something similar to
uniq
> within perl? (I already have it sorting correctly)
>
>
>
> Craig Hammer
> Internal Infrastructure Team Lead
> Parago, Inc.
> 972-538-3936
>
>
>
>
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]