I think your choices are:

(1) set it up so that the client submits a POST (as opposed to a GET), and uploads the lat/lon list as text data (but this will make more work for parsing the text), or

(2) send the lat/lon list as array-type parameters (a given param name may occur multiple times in the query, and CGI allows you to load all params with a given name into an array); this is discussed in the CGI man page.

In the latter case, you may want to make "LatLon" a single cgi param with some internal syntax (e.g. use values that look like "12.34n56.78w" -- something that is easy to handle with a regex and is reasonably readable/usable by humans). Either that, or else you'll need to be extra careful about keeping each distinct "Lat" and "Lon" param in the correct order, so that the pairs don't get scrambled.

Apart from that, you might want to look into HTML::Template and take the HTML text out of the code -- the module has some features (looping constructs) that will be very useful here. Once you catch on to it, your code will be a lot simpler and shorter (and your HTML will be easier to maintain, too).

And why do you have your own "print_header" function? Why not just do "print $cgi->header" when you need to?

Update: Sorry, I may have missed the point of your question. Where are the values in "@warningpoints" supposed to come from?


In reply to Re: Need Help With Writers Block by graff
in thread Need Help With Writers Block by awohld

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.