I think your problem is that this:
while( < $fh > )
...should be this:
while ( <$fh> )
The difference is that the one that works does not have spaces before and after "$fh". With the spaces in there, it's actually trying to use the filehandle for glob (not what you intended).
A few other recommendations.
In reply to Re^3: Apache piping to perl
by kyle
in thread Apache piping to perl
by WiseGuru
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |