in reply to Structuring maillog data - hopefully simple question on arrays/hashes
You probably meant:foreach $keys (%msgids) { if ($key =~ /$line/) { delete $msgids $key; } }
This will probably create a large temporary list in memory (keys %msgids) (and you seem to be missing a close brace).foreach $key (keys %msgids) { if ($key =~ /$line/) { delete $msgids{$key} } }
while (($key, $value) = each(%msgids)) { if ($key =~ /$line/) { delete $msgids{$key} } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Structuring maillog data - hopefully simple question on arrays/hashes
by billie_t (Sexton) on Jun 12, 2007 at 06:57 UTC |