open ( UPLOADFILE, ">$dir/$file" ) or die "$!"; while ( <$upload_filehandle> ) { print UPLOADFILE; }