my $logfile=$PWD.$Thismachineaddr.".log"; open(LOGF, ">$logfile"); ... open STDIN, '/dev/null'   or die "ERROR: Can't read /dev/null: $!"; open STDOUT, '>>/dev/null' or die "ERROR: Can't write to /dev/null: $!"; open STDERR, '>>/dev/null' or die "ERROR: Can't write to /dev/null: $!";