Package UploadDemo; use Apache::Constants ':common'; use Apache::Request; sub handler { my $r = Apache::Request->new ( shift ); get_file($r); } sub get_file { my $r = shift; eval { # slurp local $/ = undef; my $upload = $r->upload ( $name_of_file_upload_field ); my $fh = $upload->fh(); my $uploaded_string = <$fh>; # save # ... (save code/call here) }; if ( $@ ) { $r->log_error ( "upload failed -- $@" ); return SERVER_ERROR; } $r->content_type ( "text/plain" ); $r->print ( "ok -- file was uploaded" ); return OK; } #### SetHandler perl-script PerlHandler UploadDemo