in reply to temp filehandle to filename

$r->sendfile requires a file name and <=&24 isn't the name of a file. Perhaps you shouldn't create a file with no name, or perhaps you should read in the file yourself and send it using $r->print.