Have you tried narrowing down the cases that make the script run wild? Are they always the same queries, or is there no apparent pattern to it?

As far as your code goes, there are several things I feel I should point out.

For starters, you should use: use lib '/Xbase'; instead of your BEGIN block.

Another thing is, why are you using Socket.pm? Maybe I missed something, but I didn't see anything that needed that module

Next off you should be using CGI.pm instead of parsing out form input yourself.

Also, you use /gis on a lot of your matches on a variables, but not sure why. In most cases it seems that matching once would be fine (in an if statement), thus no need for /g, /s if I recall properly (regex gurus correct me if I'm mistaken), makes '.' match a newline (so unless you've got real regex stuff inside those variables, this is probably not what you want.) Which brings to the next thing, your trusting the input to be valid and good (which is really a whole different discussion), at the vary least, to make the regex's work more like expected (again unless you're doing something strange elsewhere that I'm not aware of), you should probably use quotemeta on the variables that you are using as your match pattern.

I'm not really familiar with Xbase or Novell, so I can't tell you what problems you may or may not be having there, but there seems to be a lot of code to clean up no matter where the exact problem lies.

cephas

In reply to Re: Novell NetWare perl reading DBF's. by cephas
in thread Novell NetWare perl reading DBF's. by ti-source

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.