I’m just beginning to learn perl and am trying to create a login for my website. My login form takes a username and password and passes that to the login processor (login.pl). I want login.pl solely to determine the success or failure of the login credentials, then, if successful, pass along some user info to another part of the web app. I.e., I don’t want to combine the credential checking and another part of the app, I want to separate the function.

I’ve tried using the exec function, but that runs the script in command line mode instead of CGI, which results in a long delay and a broswer error “The connection was reset”.

How do I end the perl script called by the web form and initiate another script without interaction from the user?

Any help you can provide is greatly appreciated.

System information:
Perl version: v5.8.8 built for MSWin32-x86-Multi-Thread (ActivePerl)
Web server: Apache
This is an XAMPP installation all running local


In reply to How to call perl CGI script from another perl CGI script by Calm

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.