in reply to An unfortunate incounter with PHP (loading php output into a perl variable)
I've never looked into it, but a few times I've had situations where the behaviour of backticks wasnt as I suspected. Have you tried something like
my $header=do { open my $php,'php -q /var/www/html/testing/header.php |' or die "PHP puked: $!"; local $/; <$php> };
Which although untested should do the same thing, but might work. Also try doing it via the shell explicitly. For instance on Win2k I might do "cmd.exe /c php ...". Anyway, usually when backticks havent done what I thought it should, one of the others has. :-)
|
|---|