I'm pretty new to templates and am not sure where to turn for more in-depth doco, so ...
 
I have constructed an array of hash references which look like this:
 
 
$VAR1 = [
{
'1991' => {
    '2002' => 0,
    '1992' => '5',
    '2000' => '1',
    '1998' => '1'
            }
},
{
'1992' => {
    '2002' => 0,
    '1999' => '1',
    '2003' => '7',
    '1993' => '7',
    '1994' => '1',
    '1996' => '1',
    '2000' => 0,
    '2001' => '1',
    '1998' => '2'
            }
},
{
'1993' => {
    '2002' => '19',
    '1999' => '17',
    '2003' => '43',
    '2004' => '15',
    '2005' => 0,
    '1993' => '3',
    '1994' => '37',
    '1995' => '13',
    '1996' => '13',
    '2000' => '25',
    '1997' => '10',
    '2001' => '36',
    '1998' => '15'
            }
},
 
The 0zth element of the array has a reference to a hash in which the key is a year which points to a hash reference which is made up of a bunch of other years which counts for those years.  Basically, for each year, a number of events happened in subsequent years, and the numbers for each key (year) is the count of how many events occurred in that year.
 
I wish to create a table with the year on the left, and the counts for each of the subsequent years strung out to the right of that year.  I can't quite figure out how to handle anonymous hashes in templates, so I was hoping someone could give me a pointer, or a code fragment in which they did something similar.  Alternatively, if it would be better to create a different form of data structure, I could do that, but I'm sure there must be a way to accomplish what I want to do.
 
TIA
 
Bernard Golden
 
 

Reply via email to