Help for this page

Select Code to Download


  1. or download this
    my $sth = $dbh->prepare('select * from songs limit 5');
    $sth->execute;
    ...
    my $template = HTML::Template->new(scalarref => \$tmpl);
    $template->param(data => \@data);
    print $template->output;
    
  2. or download this
    print Dumper \@data;
    __END__
    ...
              $VAR1->[0],
              $VAR1->[0]
            ];
    
  3. or download this
    print Dumper $_ for @data;
    __END__
    ...
              'year' => '1978',
              'id' => '5'
            };
    
  4. or download this
    sub FETCH {
      my $self = shift;
    ...
      my %row = %{$self->[1]};
      return {%row};
    }