Fellow monks, I've got a skull-scratcher that is beyond me. Any assistance would be greatly appreciated.

I have an Apache::ASP page that takes user input and posts it back to itself. My problem is that about every 3-5 times that I submit the form, the SENTDATA var isnt accessable from check_login_output.

Note: it works most of the time and I'm confused because this behavior is intermittent.

Here's the code

<% use CGI ':cgi-lib'; my %SENTDATA = Vars; print join('|', "1",$SENTDATA{UID},\%SENTDATA,"<br>"); if (! $SENTDATA{UID}) { # no passed userid, show the input screen print join('|', "2a",$SENTDATA{UID},\%SENTDATA,"<br>"); &amp;amp;amp;amp;amp;amp;amp;show_login_input(); } else { print join('|', "2b",$SENTDATA{UID},\%SENTDATA,"<br>"); &amp;amp;amp;amp;amp;amp;amp;check_login_input(); } $Response->End(); sub check_login_input { print join('|', "3",$SENTDATA{UID},\%SENTDATA,"<br>"); } sub show_login_input { # html input <SENTDATA method='POST'> %>

Here's the output from when it works:

1|506651|HASH(0x20656624)| 2b|506651|HASH(0x20656624)| 3|506651|HASH(0x20656624)|

Here's the output from when it doesn't work:

1|506651|HASH(0x20672eb0)| 2b|506651|HASH(0x20672eb0)| 3||HASH(0x202e110c)|

Now for the Question(s):

Misc Config Info
Perl/5.6.1
Apache/1.3.20 (Unix)
mod_perl/1.26
Apache::ASP/2.25
use strict and Taintcheck set to true in httpd.conf
CGI.pm is the one that shipped with 5.6.1, I think it's 2.752


In reply to Variable scoping and mod_pel/Apache::ASP by lo_tech

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.