The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

# Copy stdin to stdout or stderr.  Try to mess up the STD* files when done.

my $out = $ARGV[0] ? \*STDERR : \*STDOUT;

while (<STDIN>) {
    print $out $_;
}

# Try to break stdio
open(F, ">/dev/null") || die;
select(F);
open(STDIN, '>&F') || die;
open(STDOUT, '>&F') || die;
open(STDERR, '>&F') || die;