I normally call perl scripts from PHP as below and pass in variables this way, and it works fine, however now I am building a component for re-use where I want to also varia
In your second code, you're concatenating the variables without spaces between them. You should consider using sprintf to format this nicely:
sprintf
$script = sprintf('/var/www/other_scripts/perl/apps/%s.pl %s %s %s %s', $perlscript, $var1, $var2, $var3, $var4);