Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Search results on multiple pages.

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

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 05: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
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others wandering the Monastery: (5)
As of 2024-04-19 23:16 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found