jbullock35 has asked for the wisdom of the Perl Monks concerning the following question:
A TT2 curiosity: pop does what it always does—but when I have template code embedded in HTML, it also inserts the popped value into my HTML, causing it to be displayed on screen. For example,removes "3" from the list and inserts it into my HTML. I don't want it to insert anything into my HTML. I just want the list to contain one less value. I see a lot of ways to do this, e.g., but I don't like any of them. The example I've provided is unsatisfactory because I've no use for the popped value. I would use something like but I won't always know the length of the list in advance. Isn't there a simple standard way to do what I want? Many thanks. I searched the TT mailing list but couldn't find anything speaking to this. |
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Template Toolkit: silencing pop() and the other list virtual methods
by PodMaster (Abbot) on Dec 05, 2005 at 07:44 UTC | |
Re: Template Toolkit: silencing pop() and the other list virtual methods
by holli (Abbot) on Dec 05, 2005 at 07:54 UTC | |
by PodMaster (Abbot) on Dec 05, 2005 at 07:56 UTC | |
Re: Template Toolkit: silencing pop() and the other list virtual methods
by EvanCarroll (Chaplain) on Dec 05, 2005 at 07:12 UTC | |
Re: Template Toolkit: silencing pop() and the other list virtual methods
by jbullock35 (Hermit) on Dec 06, 2005 at 09:04 UTC |