in reply to a dumb question
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.
|
|---|