Dru has asked for the wisdom of the Perl Monks concerning the following question:
my %count, %hash; while (<FILE>){ next unless /something/; if (/<LONG REGEX>/){ $hash{$3} = { sig => $1, src => $3, proto => $2, dst => $4, port => $5, }; if ($hash{$3}{src}){ $count{$3}++; } } }
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: One Hash Instead of Two
by McDarren (Abbot) on Feb 06, 2007 at 16:39 UTC | |
Re: One Hash Instead of Two
by davorg (Chancellor) on Feb 06, 2007 at 16:30 UTC | |
Re: One Hash Instead of Two
by polettix (Vicar) on Feb 06, 2007 at 18:44 UTC | |
Re: One Hash Instead of Two
by Dru (Hermit) on Feb 06, 2007 at 21:25 UTC | |
Re: One Hash Instead of Two
by fenLisesi (Priest) on Feb 06, 2007 at 18:32 UTC |