$html_out =~ s/<!-- ([a-zA-Z0-9_]+?) -->/${$1}/;
こうか