When you go into your decoding routine, you should have a set of names - values... You don't seem to have a NAME tag on the INPUT fields (maybe a transcription oversight). So, in the HTML, I'd have something like this (leaving out all the table stuff for clarity):
<form action="myscript.cgi" method="post"> <input type="hidden" name="action" value="decode"> <input type="text" name="row1" value="3">List of values from row 1 <input type="text" name="row2" value="1">List of values from row 2 <etc...> <input type="submit" value="Chsnge order"> </form>

Then in your CGI script, you just have to check for the presence of the "action" parameter. If it's there, you know to sort the lines based on the new values that were input by the user. (You indicated you knew how to do this, so I'll leave that explanation out...) Then write the file and voila!

There are probably ways to make this more efficient, of course...


In reply to Re: Flat File Sorting Issues by mpolo
in thread Flat File Sorting Issues by Stamp_Guy

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



  • 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:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.