Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re^2: Win32::Console problem

by hoffy (Acolyte)
on Nov 23, 2009 at 04:55 UTC ( [id://808731]=note: print w/replies, xml ) Need Help??


in reply to Re: Win32::Console problem
in thread Win32::Console problem

Thanks! Seems so simple and it works!

Now, I do have a non essential quest for knowledge....why did it work on V5.6 but no V5.8?

Replies are listed 'Best First'.
Re^3: Win32::Console problem
by syphilis (Archbishop) on Nov 23, 2009 at 06:12 UTC
    why did it work on V5.6 but no V5.8?

    The rules regarding automatic flushing of the STDOUT buffer changed from perl-5.6 to perl-5.8. Setting $| (or incrementing it from 0 to 1, as per BrowserUk's approach) is the way to make sure that the perl-5.8 STDOUT buffer gets flushed in much the same way as happened automatically with perl-5.6.

    For a simple demo of the difference, the following outputs hellogoodbye on 5.6, but goodbyehello on 5.8:
    perl -e "print STDOUT \"hello\";print STDERR \"goodbye\""
    Setting $| will ensure that hellogoodbye is output on both 5.6 and 5.8:
    perl -e "$|=1;print STDOUT \"hello\";print STDERR \"goodbye\""
    Cheers,
    Rob
Re^3: Win32::Console problem
by BrowserUk (Patriarch) on Nov 23, 2009 at 05:27 UTC
    why did it work on V5.6 but no V5.8?

    I have no idea.


    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    "Science is about questioning the status quo. Questioning authority".
    In the absence of evidence, opinion is indistinguishable from prejudice.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others chanting in the Monastery: (4)
As of 2024-04-24 05:59 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found