use strict; use warnings; use Fcntl; sysopen(STDOUT, './foo.bar', O_WRONLY | O_APPEND | O_CREAT) or die $!; while (1) {   sleep 1;   print "Hello World\n" or die $!; }