$ perl -E' my $fh = \*STDOUT; say $fh "test"; say $fh == STDOUT || 0; say $fh eq STDOUT || 0; say $fh == *STDOUT || 0; say $fh eq *STDOUT || 0; say fileno($fh) == 1 || 0; say fileno($fh) == fileno(STDOUT) || 0; ' test 0 0 0 0 1 1