Re: [Templates] creating lists

[prev] [thread] [next] [Date index for 2004/12/01]

From: Andy Wardley
Subject: Re: [Templates] creating lists
Date: 16:46 on 01 Dec 2004
Dave Howorth wrote:
>   my_hash.$listname.push(a_number)
> 
> This doesn't work...

[...]

> Is there a neat way to do this?

  DEFAULT my_hash.$listname = [ ];
  my_hash.$listname.push(a_number)

The DEFAULT will ensure that you create the list the first time (and only
the first time) it is used.

A


_______________________________________________
templates mailing list
templates@xxxxxxxxxxxxxxxx.xxx
http://lists.template-toolkit.org/mailman/listinfo/templates

[Templates] creating lists
Dave Howorth 14:46 on 01 Dec 2004

Re: [Templates] creating lists
Andy Wardley 16:46 on 01 Dec 2004

Generated at 08:56 on 15 Mar 2005 by mariachi v0.52