select STDOUT; $| = 1; unless (open STDOUT, "|-") { eval { while(<>) { my $now = DateTime->now; print "$now: $_"; } }; exit(0); }