Problems? Is your data what you think it is? | |
PerlMonks |
Re: Killer byte tripping up Perl?by Laurent_R (Canon) |
on Dec 12, 2018 at 22:55 UTC ( [id://1227181]=note: print w/replies, xml ) | Need Help?? |
Just a wild guess.
reads data line by line assuming that it is a text file with lines separated by new line characters. If your mycmd command is producing binary output, then you probably need to read the output as binary input. Maybe you should read blocks of bytes using the read command rather than the readline function or the equivalent <...> operator. Also take a look at the binmode function (for input as well as for output). Update: fixed the links above to that they lead directly to the relevant Perl documentation pages instead of a search page.
In Section
Seekers of Perl Wisdom
|
|