Beefy Boxes and Bandwidth Generously Provided by pair Networks vroom
laziness, impatience, and hubris
 
PerlMonks  

Search results on multiple pages.

by Anonymous Monk
on Feb 23, 2001 at 23:51 UTC ( [id://60587]=perlquestion: print w/replies, xml ) Need Help??

This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.

Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question: (cgi programming)

I am curious as to know how search engines for example Altavista can display results on multiple pages. From what I already know, this code will display results on the set number.
@results = $results; $results_to_Show = 10; for ($x=0; $x < $results_to_show; $++) { print "$results[$x]"; }
This is all that I know for now but, How can I display the next set of 10 results?

Also: How can I display results in this form: ' Result pages: 12345 next>> '

thanks for your support,

Originally posted as a Categorized Question.

Replies are listed 'Best First'.
Re: Search results on multiple pages.
by Coyote (Deacon) on Feb 24, 2001 at 00:21 UTC
    Check out HTML::Pager from your local CPAN mirror.

    From the HTML::Pager documentation:

    DESCRIPTION

    This module handles the paging of data coming from an arbitrary source and being displayed using HTML::Template and CGI.pm. It provides an interface to pages of data similar to many well-known sites, like altavista.digital.com or www.google.com.

    This module uses HTML::Template to do all its HTML generation. While it is possible to use this module without directly using HTML::Template, it's not very useful. Modification of the look-and-feel as well as the functionality of the resulting HTML should all be done through HTML::Template objects. Take a look at HTML::Template for more info.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://60587]
help
Sections?
Information?
Find Nodes?
Leftovers?
    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.