Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: How to convert non-ASCII output from qx

by tobyink (Abbot)
on Jun 18, 2012 at 07:07 UTC ( #976770=note: print w/ replies, xml ) Need Help??


in reply to How to convert non-ASCII output from qx

"why doesn't Perl handle this conversion itself by determining what command output encoding is in effect and converting as needed?"

How could it even reliably determine whether the output was text? A command launched via qx could easily be outputting binary data (e.g. an image; some compressed data; etc). "Converting encoding" on binary data is very likely to corrupt it.

perl -E'sub Monkey::do{say$_,for@_,do{($monkey=[caller(0)]->[3])=~s{::}{ }and$monkey}}"Monkey say"->Monkey::do'


Comment on Re: How to convert non-ASCII output from qx
Download Code
Re^2: How to convert non-ASCII output from qx
by freonpsandoz (Initiate) on Jun 19, 2012 at 07:15 UTC
    How about something like qx/command/t to indicate text output?

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (18)
As of 2014-07-31 14:27 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (249 votes), past polls