On 3/2/2010 8:12 AM, Ronald J Kimball wrote:
...
> BTW, m/^(.*)$/gsm does not split the string into lines.  It matches and
> returns the entire string in a single match.  You could try split /^/m
> instead, but you don't actually need to split into lines before passing
> to run3 anyway.

(I replied to Mr Kimball instead of this list; her it is again)

OK, he is right, and I'm a complete n00b.  Here is my final code for 
piping through an external program from within a PERL block.

         [%- PERL -%]
         use IPC::Run3 qw(run3);
         my $inlines = $stash->get('content');
         my @outlines;
         run3 ['perl', 'lib/compact_css.pl'], \$inlines, \...@outlines;
         print PERLOUT @outlines;
         [%- END -%]

_______________________________________________
templates mailing list
templates@template-toolkit.org
http://mail.template-toolkit.org/mailman/listinfo/templates

Reply via email to