or download this
#!/usr/bin/perl
# Upload script by Erik Möller - moeller AT scireview DOT de - public
+domain
...
print "Everything seems to be OK. Log will be written to $dir/debug.tx
+t.\n";
open(DEBUG,">$dir/debug.txt") or die "Could not write file.\n";
print DEBUG @responses;