Help for this page

Select Code to Download


  1. or download this
      my @words = qw(I Am Cool);
      my @numbers = qw(1 2 3);
    ...
      }
      # finally, assign the loop data to the loop param, again with a ref
      $template->param(THIS_LOOP => \@loop_data);
    
  2. or download this
      sub getLoopData {
        my $table = shift;
    ...
        }
          return \@rows;
      }
    
  3. or download this
      my $template->param(foo_loop => &getLoopData('foo', 'bar', 'baz', 'm
    +oo'));
    
  4. or download this
      my @years = ();
      my @years_loop = ();
    ...
        push (@years_loop, \%year_data);
      }
      $template->param(years_loop => \@years_loop);