http://qs321.pair.com?node_id=11128973


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 (Saint) 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