in reply to Template:::Variables?
This is an oddly titled question. It sounds like you're asking how to make a CGI script run without knowing the location of Perl. I think the shell stuff in eg/nih in the standard Perl distribution might help you.
In Section
Seekers of Perl Wisdom