いきなり具体例から行こう。sub coloring { my ($color, $data) = @_; my $ret; if($color eq 'black') { $ret = "<font color=¥"#000000¥">$data</font>"; } elsif ($color eq 'red') { $ret = "<font color=¥"#FF0000¥">$data</font>"; } elsif ($color eq 'green') { $ret = "<font color=¥"#00FF00¥">$data</font>"; } elsif ($color eq 'blue') { $ret = "<font color=¥"#0000FF¥">$data</font>"; } elsif ($color eq 'white') { $ret = "<