sub html_escape{
my @value = @_;
for (my$i=0;$i<@value;$i++){
$value[$i] =~ s/&/&/g;
$value[$i] =~ s/</</g;
$value[$i] =~ s/>/>/g;
$value[$i] =~ s/"/"/g;
$value[$i] =~ s/'/?/g;
}
return @value==1 ? $value[0]:@value;
}
my $test = "a <br> b <br> c <br>";
my @test = (qw/a <br> b <br> c <br>/);
my %test = (qw/a <br> b <br> c <br>/);
my $test_html = &html_escape($test);
my @test_html = &html_escape(@test);
my %test_html = map{$_,&html_escape($test{$_})}keys %test;
#@test_html{sort keys %test} = &html_escape(sort values %test);
print $test_html,"<br><br>",@test_html,"<br><br>",%test_html;

簡単に作ろうと思いました。これで動作しますが、実はマグレでどこか穴などありますか?
できれば
my %test_html = &html_escape(%test);
が理想だったのですが。