sub MacroSubst { ... # 원래 소스 코드에는 < 와 > 로 적혀 있는 것을, {{{ }}} 태그 사용을 위하여 # &__LT__; 와 &__GT__; 로 수정했다. 자세한 내용은 {{{ }}} 태그 도입 항목을 참조 $txt =~ s/\&__LT__;goto\((.*)\)\&__GT__;/&MacroGoto($1)/gei; $txt =~ s/\&__LT__;history\((.*)\)\&__GT__;/&MacroHistory($1)/gei; ### 다음 라인을 추가 $txt =~ s/\&__LT__;mysign\(([^,]+),(\d+-\d+-\d+ \d+:\d+.*)\)\&__GT__;/&MacroMySign($1, $2)/gei; ### return $txt; }
sub MacroMySign { my ($author, $timestamp) = @_; return "\n<div align=\"right\">-- $author <small>$timestamp</small></div>\n"; }