my @paths = [ { id => 1, path => [A,B], order => 'F' }, { id => 2, path => [C,D,E], order => 'F' }, { id => 3, path => [E,B], order => 'F' } ];