in reply to Calling Perl scripts from PHP.

When run as a cgi script, it runs in a different directory and/or has different contents in @INC.

Try a use lib "path/to/modules"; in your script and see if that does it.