I don't know a thing about Perl so please be gentle.

Okay, I've been somewhat verbose below, ask if you need anything clarified.

Any suggestions on how to debug this?

Well, if it is generating a web page, it SHOULD be using the CGI.pm module (Modules are basically libraries). If you see a line like use CGI; near the top of the script, it uses this module. If that is the case, you should be able to run it from the command line, and it will act as if it was called from a browser.

Of course, if this script is not called from a browser, but instead from a cron job or something like that, and the output redirected to an HTML file, that advice doesn't hold.

A large problem here is that you are calling egrep without checking for errors. It may well be that egrep isn't in the PATH of the environment that this script is running under.

I was hoping to display what that actual query looks like within the qx .... is there a way to write that out to a file or the html page?

I'm not sure what you are asking for here. You can see that the variables correctly interpolated by changing qx{} to qq{} and printing the resulting string, but that doesn't tell you anything about the results of the call itself.

One second and I'll throw some code to do what I think you're trying to do.

Update: See my post two below for my later thoughts.


In reply to Re: a dumb question by swiftone
in thread a dumb question by Motley

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.