Think about Loose Coupling | |
PerlMonks |
Re: Three argument version of open '>-'by Fletch (Bishop) |
on Mar 01, 2021 at 22:23 UTC ( [id://11128970]=note: print w/replies, xml ) | Need Help?? |
If the OS provides it perhaps explicitly opening /dev/stdout as the filename? Or maybe no because that's going to behave like your "prints OK" block because it'd return a new descriptor on the device. Slightly ebil but maybe open( my $output, ">>&=", STDOUT->fileno ) would get it? (I want to say that should create a new handle instance pointing to the same underlying descriptor which seems to be what >- was doing).
The cake is a lie.
In Section
Seekers of Perl Wisdom
|
|