or download this
$object->log_file("filename" | $filehandle | \&coderef | undef)
Log session to a file. All characters send to or received from the spa
+wned process are written to the file. Normally appends to the logfile
+, but you can pass an additional mode of "w" to truncate the file upo
+n open():