use warnings; use strict; use autodie; #for each vol_size_entry in the volsize file do # add the vol_size_entry to the volsize lookup (keyed on vol name) #done open FILE, " $_[1]); } ; close FILE; #for each host_entry do # lookup the size of the vol for the host # add the vol size to the record for the host #done open FILE, ") { next if /_name/; local @_ = split; $hostsize{$_[1]} += $volsize{$_[0]}; } close FILE;