t using this while (my $dump = <$fh>) { next if not $dump =~ /\S/; foreach my $type (qw(json yaml simple)) { eval {$tmphist = Math::SimpleHisto::XS->new_from_dump($type, $dump);};