# File blah.conf title = node1 x = 10 y = 20 title = node2 x = 10 y - 29 sourcename = node1 targetname = node2 # After parsing file and placing into %conf you will have %conf = ( node = { title = { node1 = { loc = { x => 10, y => 20, }, }, node2 = { loc = { x => 10, y => 20, }, }, }, }, edge = { sourcename => node1, targetname => node2, }, ) # You can then reference pieces thereof via $conf->{node}->{title}->{node1}->{loc}->{x};