On Wed, Oct 19, 2011 at 1:10 AM, Leo Susanto <leosusa...@gmail.com> wrote:
> use strict; > my %CELL; > my %CELL_TYPE_COUNT; > my $timestamp; > my $hour; > while (my $line = <DATA>) { > if ($line =~ m|\d{1,2}/\d{1,2}/\d{2} ((\d{1,2}):\d{1,2}:\d{1,2})|) { > #10/17/11 18:25:20 #578030 > $timestamp = $1; > $hour = $2; > } > > if ($line =~ /CELL\s+(\d+)\s+(.+?),.+?HEH/) { # take CELL number > into > $1 and the information after the number (and before the first comma) > into $2 > if ((17 <= $hour)&&($hour <=21)) { > $CELL{$hour}{$1}{$2}++; > $CELL_TYPE_COUNT{$2}++; > } > } > } > > > Would someone help me understand what this block of code is doing after the if condition? Is it utilizing references and counting the occurences of the keys? I am having some trouble digesting it. Thanks for the clarification, Chris