my @items = map {$licensehash{$_->[0]}{$_->[1]}} sort {$a->[2] cmp $b->[2]} map { my $top = $_; map {[$top, $_, $licensehash{$top}{$_}[3]]} keys %{$licensehash{$_}} } keys %licensehash; print "$_->[3]: $_->[0]\n" for @items; #### Chassis Serial: Creation Date: Creation User: Customer Name: Epoc: Key Type: LMU Version: Lenovo Serial: Lenovo UUID: MAC 1/UUID: MAC 2: NAS: Sync Replication: iSCSI: iTX Version: