It's been a while since I've used Perl and I need some help with a multidimensional array.
I have a file that I need to compile some stats on. I need to keep track of 'actions' and 'rules'. Yes, stats from a firewall. Both 'actions' and 'rules' need to be dynamic so if a rule is added, it's automatically dealt with. As I loop through the file I have both the current action and rule as a variable. I've tried to store them several ways... my @actionrule; $actionrule[$action][$rule]++; I need some kind of loop to extract the data. I also need to know what the action and rule of each count is. I've tried a few while and foreach loops without success. Within the loop I need to build a query (per record). $query="insert into tmpfw set action=$action, rule=$rule, count=$count"; foreach $first (@actionrule){ foreach(@first){ print $_."\n"; } } Not only does it not print the counts, but how do I get the action and rule associated with it? Thanks, Mike -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>