in reply to Re^2: help deriving mysql query from perl script
in thread help deriving mysql query from perl script

Then maybe first use the other half of the program to fill/create $where_clause and then print $where_clause instead of running it against the database.

If you don't know how to do that either, I don't know how to be of more help to you. You will have to show us the output and log entries you get when you run the modified/split program and show us the source of that split program.