in reply to Having trouble looping through a data structure

Lately, when I get bogged down in a structure, I use Data::TreeDraw. It helps. The only drawback perhaps is that it requires perl 5.10 or later. Here's a simplified script:
#!/usr/bin/perl use strict; use warnings; use Data::TreeDraw; my $data = ['article' => { 'SKU' => [ 'CDS00013' ], 'InternalSKU' => '179', 'AvailableItems' => [ '100' ] }, { 'SKU' => [ 'CDS00014' ], 'InternalSKU' => '180', 'AvailableItems' => [ '102' ] } ]; print draw($data), "\n";