in reply to Re: Perl Optimization
in thread Perl Optimization
my %htable_re; #reading in small file while($cur_line=<size_log>) { my @command=split(/;;;+/,$cur_line); $htable_re{$command[0]}=qr/\b($command[0])\b/i #parse remainder of line... } #pattern match against big file while(<fh_log>) { foreach $key (keys %htable_re) { if(/$htable_re{$key}/ ) #If this query contains reference to t +his table { $table_stats{$key}++; #count up how many times this table +is referenced. $table_refs++; } } }
|
|---|