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:
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} }
|
|---|