in reply to Pagination with in HTML::Template

You're missing a semicolon.
perl -e"my $ERROR = sub {} my $EEEEK = 1;" --------------------------^

MJD says "you can't just make shit up and expect the computer to know what you mean, retardo!"
I run a Win32 PPM repository for perl 5.6.x and 5.8.x -- I take requests (README).
** The third rule of perl club is a statement of fact: pod is sexy.

Replies are listed 'Best First'.
Re^2: Pagination with in HTML::Template
by Anonymous Monk on May 01, 2005 at 17:54 UTC
    That worked, thank you.

    Now how do I populate that with data? I am trying this:

    my $dbh = DBI->connect( "dbi:xxx:xxx", "xxxx", 'xxxx'); my $sth = $dbh->prepare('SELECT title, url FROM fd_ent +ries ORDER BY timestamp DESC LIMIT 200'); $sth->execute(); # create a callback subroutine to generate the data to be paged my $get_data_sub = sub { my ($offset, $rows) = @_; #my @return_array; my $return_array = $sth->fetchrow_array(); for (my $x = 0; $x < $rows; $x++) { push(@return_array, [ $data[$offset + $x]{title}, $data[$offset + $x]{url} ] ); } return \@return_array; } ;
    I know that is way off, but I don't how how far.

    Thank you.