Is it possible to create a hybrid script i.e. a single .php script with both Perl and PHP code in it? Say I set a variable in the perl module of the script and then call for it in the PHP module.
Any help is appreciated!
Not in one script. You need perl to read the perl code, and php to read the php code. If you wanted to use perl within php, you'd have to start a perl script from the php, and fetch the output of the perl script back into php.