in reply to Pagination with in HTML::Template

I believe your error lies in the trailing comma in your $pager definition.

Additionally, don't forget to use strict; and use warnings (or -w). If you can't make sense of perl's error messages, try use diagnostics;

To return a subset of the results, you're probably looking for an array splice.

UPDATE: I didn't (initially) have a copy of HTML::Pager to parse this through strict and warnings. As PodMaster pointed out, the problem lies in the omitted ; Nevertheless, use of strict and warnings would likely have precluded this problem in the first place:

syntax error at tmp line 23, near "my " Global symbol "$pager" requires explicit package name at tmp line 23. Global symbol "$get_data_sub" requires explicit package name at tmp line 26.
Global symbol "$pager" requires explicit package name at tmp line 36. tmp had compilation errors (#1) (F) Probably means you had a syntax error. Common reasons include: A keyword is misspelled. A semicolon is missing. A comma is missing. An opening or closing parenthesis is missing. An opening or closing brace is missing. A closing quote is missing.
Often there will be another error message associated with the syntax error giving more information. (Sometimes it helps to turn on -w.) The error message itself often tells you where it was in the line when it decided to give up. Sometimes the actual error is several tokens before this, because Perl is good at understanding random input. Occasionally the line number may be misleading, and once in a blue moon the only way to figure out what's triggering the error is to call perl -c repeatedly, chopping away half the program each time to see if the error went away. Sort of the cybernetic version of S<20 questions>. Uncaught exception from user code: syntax error at tmp line 23, near "my " Global symbol "$pager" requires explicit package name at tmp line 23. Global symbol "$get_data_sub" requires explicit package name at tmp line 26. Global symbol "$pager" requires explicit package name at tmp line 36.