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

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
Well sorting alphabetically is easy, even a simple search on perlmonks can tell you how to do that. I can even give you the node: How do I sort something alphabetically?

For your result grouping, if you always load the entire file into an array on each page load you can simply do something like
my $start = (get starting number from your input); for ($start..$start+10) { (do things with $array[$_]); }
You'll have to set it up so that the first time the results are displayed it starts with 0. Then on each page load set the next 10 and previous 10 links to pass paramaters back to be used in $start as $start + 10; or $start - 10;

Oh, also you'll probably want to throw something in to break out of the loop if $_ becomes greater than the size of the array.

I havent really answered your question explicitly, as I got the idea that you just wanted a start, and would sort out the gory stuff yourself :)

In reply to Re: Finishing Touches by nashdj
in thread Finishing Touches by Legg83

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others sharing their wisdom with the Monastery: (7)
As of 2024-04-23 13:34 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found