To answer your last question first: To be able to restore the values of chekboxes, you could either re-write the page with placekeepers fpr HTML::Template
<input type=checkbox name=foo <TMPL_IF name="foo_checked">CHECKED </TM +PL_IF> >
Or, for ease of programming, you could use HTML::FillInForm which parses the form on the fly, and fills in the values you pass it.

As for how to pass values from one CGI to another, I suggest that your data structure should be as close as possible to the parameter passing as implemented by CGI - after all, you're already prepared to handle that.

If you use a DB_File, then you make the name of each param the key, and it's value the value. And yes, you'll have to run a join on those params that return an array. Be carefull to use a separator unlikely to appear in the name of the param (or checkbox). 0x00 is a good value for such uses.

Of course, since you gave the file the .cgi extension, you could just call it with a complete CGI style request.


In reply to Re: Passing variables to another script (theory) by matija
in thread Passing variables to another script (theory) by Anonymous Monk

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.