Aighearach has asked for the wisdom of the Perl Monks concerning the following question:
Here is the code that is not working
my %params = $r->method eq 'POST' ? $r->content : $r->args; while ( my ( $key, $value ) = each %params ) { if ( "some reg-exp that is true if there is an upload" ) { print STDERR "value=$value\n"; my $tempfile = $value; #some fiddling with the $tempfile my $buffer; print STDERR "tempfile=$tempfile\n"; open( *OUTFILE,">>/tmp/myb.$tempfile") || die "couldn't op +en outfile: $!"; while ( read( $value, $buffer, 1024 ) ) { print OUTFILE $buffer; } close( *OUTFILE ); } }
and $tempfile gets created, but is empty.
I've tried perdoc Apache, and I've tried the mod_perl Guide.
Any help or references would be greatly appriciated.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: uploads with Apache.pm
by btrott (Parson) on Jul 12, 2000 at 09:42 UTC | |
by Aighearach (Initiate) on Jul 12, 2000 at 09:56 UTC | |
|
Re: uploads with Apache.pm
by Aighearach (Initiate) on Jul 12, 2000 at 09:09 UTC |