How are you storing the data in your script? I assume
you have some sort of data structure? If you're storing
the data in an array, just print out a next link with a
parameter like "start=5"; then in your script, just print
out the array elements from the start value (5, in this
case) to the limit of records per page (the limit, in
your case, would seem to be 5).
If you're not storing the data in a data structure, but are
instead printing out each line in a while loop as you
read from the file, you can check $. for the current line
number, and only print the line if the line number is
between 5 and 10. Or something such. You could last
out of the loop after you hit the limit.
Does this make sense? There's no magic involved, really--you
just have to code it up yourself.
Also, check out Randal's WebTechniques column on this:
Giving 'more'.
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.