in reply to Need Help With Writers Block
(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?
|
|---|