Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re^2: Three argument version of open '>-'

by choroba (Archbishop)
on Mar 01, 2021 at 23:06 UTC ( #11128973=note: print w/replies, xml ) Need Help??


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

OP updated witn a SSCCE.

map{substr$_->[0],$_->[1]||0,1}[\*||{},3],[[]],[ref qr-1,-,-1],[{}],[sub{}^*ARGV,3]

Replies are listed 'Best First'.
Re^3: Three argument version of open '>-'
by LanX (Cardinal) on Mar 01, 2021 at 23:24 UTC
    Thanks, it's clearer now, you want that the "copy FH" fails if STDOUT is closed, but without emitting a warning.

    Sorry, no clue yet...

    update

    BTW: you can automatize your test-runs with an exec $0 #Test if @ARGV is empty :)

    and maybe you should also consider testing different states of autoflush.

    Cheers Rolf
    (addicted to the Perl Programming Language :)
    Wikisyntax for the Monastery

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (4)
As of 2021-04-18 18:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?