use strict;
use warnings;
my $h_vars = {
'name' => '
Fred Flintstone
',
'location' => 'Bedrock',
'favorite movie' => 'One Million Years B.C.',
'favorite book' => 'Danny the Dinosaur',
};
map { s/\\<\;/g; s/\>/\>\;/g } values %$h_vars;
# Test code
use Data::Dumper;
printf "Results %s\n", Dumper($h_vars);
__END__
Results $VAR1 = {
'location' => 'Bedrock',
'favorite movie' => 'One <i>Million</i> Years B.C.',
'name' => '<h1>Fred Flintstone</h1>',
'favorite book' => 'Danny the <b>Dinosaur</b>'
};