Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

how would i go about writing a perl script that is capable of ranking groups of data and display them on a html page. rank 1 2 3 name a b c score 9 8 7 like above only turned 90degrees, how do i store the data so it can be sorted so the one with the highest score will be display on top ? i am new to perl with just a few days use, so any help would be very welcome.

Replies are listed 'Best First'.
Re: Table formatting question.
by frankus (Priest) on Apr 25, 2001 at 14:07 UTC

    Give your question a meaningful title!

    • Use sort; you've not stated if it's a numeric grade or not.
    • You want to type perldoc CGI.pm and look for table,Tr & td.

    If this is homework please remember:
    • use strict and -w. Comment frequently, Lecturers love that.
    • Include a comment acknowledging our help, perhaps with a URL to your post.
    • You'll be a better Perl Hacker if you look for answers thus:
      1. perldoc (for your Perl distro) & www.perldoc.com
      2. CPAN
      3. A wealth of books ;-)
      4. Perlmonks (Perl FAQ, the Search button (top left) and Super Search, then SOPW).
      (it's a hubris thing ;^)

    --
    
    Brother Frankus.

    ¤

Re: retro
by BMaximus (Chaplain) on Apr 25, 2001 at 10:36 UTC
    Explaining this goes way beyond a simple answer. This also sounds like homework but forgive me if I'm wrong. I'm suggesting that you buy Mastering Algorithms with Perl by Jon Orwant, Jarkko Hietaniemi & John Macdonald. This book would give you a good idea on how to do what your asking for. For any of us to explain this right now would require us to write a book ourselves.

    --

    It just doesn't sound like you realy want to do the legwork for this.
    BMaximus

    The other monks on PM my not feel the same way. Therefore I do not speak for them. Only myself.