I have some data that has literal '\n' (two characters) where it should
have newlines. 

I had hoped that I could do a [% data | replace('\n', "\n") %], but that
doesn't seem to do anything:

  #!/usr/bin/perl -w

  use Template;

  my $tt = Template->new;
     $tt->process(\*DATA, {
       text => 'Hello.\n'
     });

  __DATA__
  [% text | replace('\n', "\n") %] Next line?


Am I missing something, or is there a bug? It works fine if I replace
any other character, but the '\' on the LHS seems to complicate things
(even if I use "\\" or whatever ...)

Thanks,

Tony



Reply via email to