for ( @$data } { print "$_ =>"; if ( ref $_ eq 'ARRAY' ) { print join ", ", @$_; } else { print join ", ", sort values %$_; } print "\n"; }