in reply to Postorder on hash structure

Recursion is a good approach here.

Consider the following example code that prints an array. You basically have two cases:

  1. The item passed does not have dependencies - print the item
  2. The item passed has references - for each reference, handle it by recursing, then print the item itself

In rough code, this would look like the following:

sub print_item_dependencies( $item ) { for my $dep (@{$item->{dependencies}}) { print_item_dependencies( $dep ); } say join "/", $item->{tool}, $item->{version} }