Hello,

I have a little question with split. I want to split my string variable on "."

Example :


data.className contents = "A.b.C";

[% BLOCK viewController %]
[% items = data.className.split('\.');
%]

[% items.last %]

That doesn't work. With Perl, I can use this :

@items = split(/\./, data->{className});

but that doesn't work with TT2.

Any idea ?

Thanks,



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

Reply via email to