Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot

Re^4: Super simple progress

by bigal_george (Acolyte)
on Dec 30, 2019 at 17:49 UTC ( #11110776=note: print w/replies, xml ) Need Help??

in reply to Re^3: Super simple progress
in thread Super simple progress

Excellent thanks. I was just wondering is there any particular reason for using print '.'; STDOUT->flush; rather than print STDERR "."; ???

Replies are listed 'Best First'.
Re^5: Super simple progress
by davido (Cardinal) on Dec 30, 2019 at 18:45 UTC

    STDERR would be fine. And local $| = 1 would be fine in place of $handle->flush (where $handle is STDOUT or STDERR).

    One thing to keep in mind is if anyone is capturing output through redirection or piping. Things that are normal behavior, then, should go to STDOUT and things that need to be "out of band" go to STDERR. I don't know if the dots belong in-band or out-of-band from standard output. I could see a case being made for either behavior. I just picked one and went with it.


Log In?

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

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (6)
As of 2020-07-08 14:43 GMT
Find Nodes?
    Voting Booth?

    No recent polls found