in reply to Math in Template::Toolkit

Looks ok (correct bracket matching and such) so maybe you've hit a bug in the parser? Try variations like:

(100-(width*(top_menu.$size)))/2 (50-(width*(top_menu.$size)/2)) (100-(width*top_menu.$size))/2 50-(width*top_menu.$size)/2 50-width*top_menu.$size/2

DWIM is Perl's answer to Gödel

Replies are listed 'Best First'.
Re^2: Math in Template::Toolkit
by talexb (Chancellor) on Apr 30, 2007 at 02:54 UTC

    Good idea, but ..

    [% extra = width/2; %]; [% extra = (width/2); %] [% extra = ($width/2); %]

    all failed. :(

    Alex / talexb / Toronto

    "Groklaw is the open-source mentality applied to legal research" ~ Linus Torvalds

      how about width*.5 ? ;)