in reply to new CGI(FILEHANDLE)

The question confuses me, but here's an answer based on what I think you're asking in question #3.

The CGI module (and pretty much all CGI-capable programs) don't read HTML forms. Web clients send HTTP data that include a URI which may have a query string or form-data with various chunks for each parameter.

If the filehandle reads from an HTML file, it won't work at all. If it reads from a file that contains well-formatted form-data as a web browser would post to a web server, it will work better.

If you know all this and this isn't your question, could you explain further what you're trying to do, not how you're trying to do it? That'll make it easier to suggest other ways to accomplish the same thing.

Replies are listed 'Best First'.
Re^2: new CGI(FILEHANDLE)
by Anonymous Monk on Aug 07, 2004 at 01:36 UTC
    I knew that wouldn't come out clear :)

    The form data is saved via $query->save(FILEHANDLE).

    Then I load it with a 'view.cgi' script using $query = new CGI(FILEHANDLE).

    However, the actual form tags are not generated with perl, they are flat HTML (stored in an external file). When I load view.cgi, it opens and displays the flat HTML form, but doesn't import the form data from FILEHANDLE.

    I am using external files for the form HTML because I want to be able to display multiple forms using the same scripts.

    My assumption was (I've just realized I could test this simply) that the form data wasn't showing up because the form was flat HTML and external - all the examples in the CGI.pm documentation construct the form inside the script using $query->createformelement(blah) construction.

    I'll welcome any suggestions on this, but I've had a chance to sleep a bit since I posted this, and I've come up with some other ideas I can try.