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

Re (tilly) 1: Open3 and bad gut feeling

by tilly (Archbishop)
on Feb 17, 2002 at 00:55 UTC ( #145934=note: print w/replies, xml ) Need Help??

in reply to Open3 and bad gut feeling

A sneaking feeling tells me that you will shortly be Suffering from Buffering. (There is a similar warning in IPC::Open3.) Namely if there is, for instance, a long error statement, you may be trying to read from its STDOUT while it is waiting for you to check its STDERR. This might take a while...

You are likely to need the select command or its OO wrapper IO::Select to do this properly. (I think you will find IO::Select easier to figure out.)

  • Comment on Re (tilly) 1: Open3 and bad gut feeling

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://145934]
[Corion]: Yaerox: There is Encode::Guess, but that needs a limited set of inputs, and it also cannot handle multiple single-byte encodings
[Corion]: If you have a BOM, that's a really easy way to recognize UTF-8. Otherwise, you can try to decode a file from UTF-8, and if that works OK and doesn't crash, most likely the file was valid UTF-8
[Corion]: But as "ansi" (Latin-1?) is a single-byte encoding, any file is a valid ANSI file

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (9)
As of 2017-03-28 13:21 GMT
Find Nodes?
    Voting Booth?
    Should Pluto Get Its Planethood Back?

    Results (332 votes). Check out past polls.