in reply to any idea how push (@$user,"$ent_date\t$message\t$firewall\t$service");
That code, which I understand isn't yours, is pretty funky. It creates a named array through a symbolic reference for each distinct $user you see. It would be much cleaner and better to use a hash.
That whole chunk of code can be replaced with:
The existence of a user can be tested with exists $control_hash{$user}.push @{$control_hash{$user}}, "$ent_date\t$message\t$firewall\t$service";
After Compline,
Zaxo
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: any idea how push (@$user,"$ent_date\t$message\t$firewall\t$service");
by ysth (Canon) on Jun 05, 2007 at 08:16 UTC | |
|
Re^2: any idea how push (@$user,"$ent_date\t$message\t$firewall\t$service");
by grep (Monsignor) on Jun 07, 2007 at 16:31 UTC |