# A hash can keep the interesting info for each server. # For every line of input, # If this line introduces a new server, # Create a new empty server structure in the hash. # If this line introduces a new partition, # Add a new partition structure in the current server. # If this line has interesting information, # Assert it into the current server and/or partition. #### $VAR1 = { 'server1' => { 'part1' => { total => 300, free => 100, used => 200 } }, 'server2' => { 'part1' => { total => 200, free => 100, used => 100 }, 'part2' => { total => 400, free => 100, used => 300 } } };