Provavelmente é uma sequência de escape terminal; você poderia extraí-los e imprimi-los um por um para ver se uma determinada seqüência faz com que o borkage:
#!/usr/bin/env perl
use strict;
use warnings;
# turn off any encoding foo
use open IO => ':raw';
# "slurp" mode for whole file reads
local $/;
# for any STDIN or files given to us...
while (readline) {
# extract ESC-followed by a number of not-ESC not-NUL characters...
while (m/(\e[^\e#!/usr/bin/env perl
use strict;
use warnings;
# turn off any encoding foo
use open IO => ':raw';
# "slurp" mode for whole file reads
local $/;
# for any STDIN or files given to us...
while (readline) {
# extract ESC-followed by a number of not-ESC not-NUL characters...
while (m/(\e[^\e%pre%]+)/g) {
printf "what does '%vx' do?\n", $1;
print $1;
# is a listing borked or not?
print qx(ls);
sleep 1;
}
}
]+)/g) {
printf "what does '%vx' do?\n", $1;
print $1;
# is a listing borked or not?
print qx(ls);
sleep 1;
}
}