in reply to Re^4: Combining Records From Multiple Files based on Common Key Values
in thread Combining Records From Multiple Files based on Common Key Values
Hmm, we love changing requirements...in that case you'd need to first build a hash which contains the server names in the key by going through all the files (caching their content if their not large enough for this to cause memory problems), and then iterate over that list of servers (see perldoc -f keys on how to do that) in the while loop, inserting the value found in the respective file or a 0, e.g.
push (@{$result{$server}},$cpua || 0)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^6: Combining Records From Multiple Files based on Common Key Values
by country1 (Acolyte) on Jul 17, 2007 at 18:28 UTC | |
by tirwhan (Abbot) on Jul 17, 2007 at 21:36 UTC |