use Data::Dumper; use strict; use warnings; my $hoa = {a => [1,2], 'b'=>[1,3], c=> [2,0]}; my $s = Dumper $hoa; $s =~ s/^\s+//mg; $s =~ s/(?