Uhm, that looks like the description of a simple Web setup. But one in which scriptA does not invoke scriptB. It's more like:
  1. Browser connects to server.
  2. Browser makes a request to server.
  3. Server calls scriptA.
  4. scriptA finishes.
  5. Server send output of scriptA to browser.
  6. Connection terminates.
  7. User goes off to buy a latte.
  8. User comes back, watches some youtube videos.
  9. User fills in form.
  10. User hits submit.
  11. Browser connects to server.
  12. Browser makes request to server.
  13. Server calls scriptB.
  14. scriptB finishes.
  15. Server sends output of scriptB to browser.
  16. Connection terminates.
By default, connections used in one script will not be available in another script. But that doesn't mean you cannot use a server framework where connections are shared - but even then, a connection will only be reused if the second request comes quickly enough.

In reply to Re^3: DB Connections across scripts from a module by JavaFan
in thread DB Connections across scripts from a module by LinuxUser2008

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.