Re: Oddness when using PERL directive

Slaven Rezic <[email protected]>
Newsgroups gmane.comp.lang.perl.modules.template-toolkit
Message-ID <[email protected]>
Neil Bowers wrote:
> Hi,
>
> I use TT2 to build my articles with CPAN module reviews. For each 
> module I write one or more scripts which illustrate use of the module. 
> A marked extract of the script is included into the article, followed 
> by output, which is generated using the PERL block. Here's an example:
>
>     <pre>[% INCLUDE 'constant-generate-dualvar.pl' | extract_code %]</pre>
>
>     <p>Which produces the output:</p>
>
>     <pre>[% PERL %][% INCLUDE 'constant-generate-dualvar.pl' %][% END
>     %]</pre>
>
Maybe something like this would work:

[%PERL %]
my $out = `constant-generate-dualvar.pl`;
print $out;
[% END %]


Regards,
    Slaven
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.