Author: Chas. OwensChas. Owens
Date: Jan 8, 2008 10:56
On Jan 8, 2008 1:40 PM, Stephan Gross jesna.org> wrote:
snip
> The problem is that one of the tag values is a picture and presumably the
> value is some kind of binary value. Once I encounter this problem, the
> print() function no longer works - meaning, I never get any more output even
> though I know there are more values coming.
snip
The problem here is not with STDOUT's buffer, but rather with your
terminal. If you were to output that data to a file you would see
that more data is in fact being written; however, your terminal is
being corrupted by the binary data you are printing. Your best bet is
to filter out the dangerous characters:
$v =~ s/(.)/ord($1) < 32 || ord($1) > 127 ? sprintf "\\x{%%04x}", ord($1) : $1/ge
|