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

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?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://11128970]
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
Find Nodes?
    Voting Booth?

    No recent polls found