http://www.perlmonks.org?node_id=934886

veerubiji has asked for the wisdom of the Perl Monks concerning the following question:

hi, I tried to get data from my hash using template toolkit but i am getting error like this

[% FOREACH st = university %] [% st.name %] [% st.location %] [% FOREACH section = st.branch.electronics.section %] branch student: [% section.name %] [% section.number %] [% section.semister %] [% section.subjects %] [% section.rank %] [% END %] [% END %]

I am getting error like this "Template process failed : File error -parser error input file handle line 51: Unexpected token(END) %END%" like this but I used correct syntax and every thing, can you tel how to overcome this error

Replies are listed 'Best First'.
Re: error in template toolkit process.
by Anonymous Monk on Oct 31, 2011 at 14:24 UTC

    but I used correct syntax and every thing, can you tel how to overcome this error

    Remove the extra [% END %] from your template

    Also, you're supposed to short code that produces, not something unrelated.

    How do I post a question effectively?

      The original posting , before it was updated

      hi, I tried to get data from my hash using template toolkit but i am getting error like this

      [% FOREACH st = university %] [% st.name %] [% st.location %] [% FOREACH section = st.branch.electronics.section %] branch student: [% section.name %] [% section.number %] [% section.semister %] [% section.subjects %] [% section.rank %] [% END %] [% END %]

      I am getting error like this "Template process failed : File error -parser error input file handle line 51: Unexpected token(END) %END%" like this but I used correct syntax and every thing, can you tel how to overcome this error

      How do I change/delete my post?