in reply to Re^2: What is the character for end of string in template Toolkit?
in thread What is the character for end of string in template Toolkit?

Not true. It works fine.
use Template qw( ); my $template = Template->new(); my $input = <<'__EOI__'; [% foo = 'Blah blah,' %] [% foo | replace(',$', '') %] __EOI__ $template->process(\$input) or die $template->error();
Blah blah

Replies are listed 'Best First'.
Re^4: What is the character for end of string in template Toolkit?
by Anonymous Monk on Jan 16, 2009 at 06:42 UTC
    Duhhh!!!! Thanks everyone! I had an whitespace after the comma:(( Works fine now!
      TT also knows how to trim your input.
      [% "Blah Blah, " | trim | remove(',$') %]

      CountZero

      A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James