Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re: Three argument version of open '>-'

by Fletch (Chancellor)
on Mar 01, 2021 at 22:23 UTC ( #11128970=note: print w/replies, xml ) Need Help??


in reply to Three argument version of open '>-' (updated)

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.
The cake is a lie.
The cake is a lie.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://11128970]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (8)
As of 2021-04-22 16:47 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?