Re: [htmltmpl] Comments
Brought to you by:
samtregar
From: Robert H. <si...@gm...> - 2007-03-07 23:40:27
|
Is there anything funky about using filters with CGI::Application? Robert Mathew Robertson wrote: > Yep, that is the form - although you wont need to 'capture', eg: > > $$text_ref =~ s|<rem>.*?</rem>||gx; > > Mathew >> sub tmpl_remark { >> my $text_ref = shift; >> >> $$text_ref =~ s|<rem>(\w+)</rem>||gx; >> } >> >> >> # passed to the template >> >> filter => \&tmpl_remark; >> >> I did not know you could use a regex in a substitute (or I never thought >> about doing so). Of course, the regex above is bogus as I am just seeing >> if that is correct form. >> >> > |