>
>I'm havig problems getting information out of a file and having it write each 
>of the dates to an array. The problem is, I don't want duplicates.
>

After reading your program carefully,I think you just want to get the count 
increase for each uniq $data.
In perl programming,HASH is very useful for this purpose.Because hash's key is 
always uniq.
I would modifiy your code here,and hope it helps to you.

use strict;
use warnings;

my %uniq_data;

while ( <> )  {
        chomp;
        my ($date, $time, $ip, $ssl, $cipher, $get, $pkg, $http, $pid, $name1, 
$name2, $name3 ) = split;
        $date =~ s/\[//;
        $date =~ s/\// /g;
        $date =~ s/\:(\d+):(\d+):(\d+)//;

        $uniq_data{$date}++;
}


Then you could loop the HASH of %uniq_data to get each $data's count.

--
Jeff Pang
NetEase AntiSpam Team
http://corp.netease.com

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


Reply via email to