Re: Comments
Mathew Robertson <[email protected]> Thu, 08 Mar 2007 08:46:22 +1100
| Newsgroups | gmane.comp.lang.perl.modules.html-template |
|---|---|
| Organization | Nielsen//NetRatings |
| Message-ID | <[email protected]> |
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.
>
>
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV