in reply to print statement does not work

1, I have installed perl (myself) and loaded a number of libraries (lwp, cgi, dbd - got lots of errors with that install).
Errors with that install? Did you fix them or just ignore them?

2, has the header #!/bin/sh if that helps
The shabang on the script should point to your perl bin whereever you installed it to, usually it is in /usr/bin/perl or /usr/local/bin/perl but not always.

-Waswas