in reply to Strings mangled on printing
Check to see if $rt has a carriage return character at the end of it.
Perhaps add something like $rt =~ s/\r//g; to strip any out.
In Section
Seekers of Perl Wisdom
in reply to Strings mangled on printing