After trying the suggestions of
blakem and
higle without success, I finally tried it as a shell script and sourced in another file with the parameters I needed, and it worked.
As much as I like to use Perl, sometimes all you need is a simple knife instead of a Swiss Army chainsaw :-)
TStanley
--------
There's an infinite number of monkeys outside who want to talk to us
about this script for Hamlet they've worked out
-- Douglas Adams/Hitchhiker's Guide to the Galaxy