Perl 如何调用过滤器';h';在梅森?
正如医生所说,我可以通过下一个代码应用H过滤器Perl 如何调用过滤器';h';在梅森?,perl,filter,mason,Perl,Filter,Mason,正如医生所说,我可以通过下一个代码应用H过滤器 但当我在标签中插入时,调用过滤器并没有被覆盖 是的,doc说我可以调用$m->filter(…),但这会产生下一个错误: Error during compilation of /.../input: Bareword found where operator expected at /.../input line 42, near "$.H" (Missing operator before H?) 我的perl代码是: $m->fil
但当我在标签中插入时,调用过滤器并没有被覆盖
是的,doc说我可以调用$m->filter(…
),但这会产生下一个错误:
Error during compilation of /.../input:
Bareword found where operator expected at /.../input line 42, near "$.H" (Missing operator before H?)
我的perl代码是:
$m->filter( $.H, "$value" );
我的工作是:
</%perl>
<% $value | h%>
<%perl>
但这很难看。请纠正我,我在
$m->filter($.H,“$value”);
上做错了什么我想你在找这个:
print $m->apply_escapes($value, 'h');
$.H
应该代表什么?$。
是Perl中的一个变量,表示上次访问的文件句柄的当前行号。使用HTML::Entities qw(encode_Entities);encode_Entities($value)
@HunterMcMillen$.H-链接到筛选器。请参阅。我也不明白它是如何工作的。@ikegami:我想使用本机功能实现代码完整性。我无法重现您的问题,我使用的是Mason和print$m->filter($.H,$value”);
工作正常。我们可以再看一点代码吗?如何使用返回的值?