First locate Cmd.pm
either you will find that file in
/usr/share/perl5/Net/Cmd.pm
OR
/usr/lib/perl5/5.8.8/Net/Cmd.pm
then find the below lines
$cmd->dataend()
if (exists ${*$cmd}{'net_cmd_last_ch'});
After that ADD the below lines
# XXX - peralta - encoding bug causes problems with OTRS!
binmode($cmd, ":utf8");
if (scalar(@_)) {
local $SIG{PIPE} = 'IGNORE' unless $^O eq 'MacOS';