On Tue, 21 Feb 2006 11:58:37 -0500 Scott Gifford <[EMAIL PROTECTED]> wrote:
> Any idea why this works from the command-line, but not from within > mod_perl? > > #!/usr/bin/perl -Tw > > use strict; > > print "Content-type: text/plain\n\n"; > local *FH = select; > print "FH: ",*FH,"\n"; > print FH "Printing to FH\n"; > p(\*FH,"Printing to FH via p().\n"); > > sub p > { > my $handle = shift; > print $handle @_; > } First off I would convert it to using IO::File or somehow get rid of using globs. Such as my $fh = select; But this won't solve your error, just makes the code easier to work with. I think the problem you are running into is that under mod_perl grabbing STDOUT is a little different. I think this should point you in the right direction: http://perl.apache.org/docs/1.0guideporting.html#STDIN__STDOUT_and_STDERR_streams --------------------------------- Frank Wiles <[EMAIL PROTECTED]> http://www.wiles.org ---------------------------------