I am running a perl script off the back of a PHP script through Apache. The script uses the P4 module to perform some P4 commands. I'm getting a really strange problem though..Heres the bit of code I'm trying to run:
$command = "print";
$CL = shift;
push @options, "-q", "$filename...\@$CL";
@info = $p4->Run( $command, @options );
@options = ();
$errors = $p4->ErrorCount();
die "Errors occured when executing p4 print -q $filename...\@$CL\n" if
+ ($errors > 0);
foreach my $element (@info)
$Components = $Components.$element;
@info = ();
$CL is a 6 digit number which is passed to the function as an argument. The problem is, when I run this through Apache it doesn't return the $Components string. However, if I explicitly set the $CL to a number (i.e $CL = 565431;) it works fine!!
The number is definitely being passed in correctly as the script runs fine as a standalone program and it isn't down to Perforce access rights either.
Any ideas cos I'm all out!!!