use strict; use warnings; use YAML; use Data::Dumper; my $stuff = <## $VAR1 = \{ 'Baked Goods' => [ { 'Cookies' => [ 'Chocolate Chip', 'Oreo' ] } ], 'Fruits' => [ { 'Apples' => [ 'Fuji', 'Granny Smith' ] }, { 'Oranges' => [ 'Tangerine', 'Navel' ] } ] }; #### printit ($perl_structure); sub printit{ my $this = shift; if (ref $this eq ""){ print " $this "; return; } for my $k (keys %$this){ print "$k\t:"; printit($_) for @{$this->{$k}}; print "\n"; } print "\n"; }