in reply to Limit on var sizes?
Perl can handle strings billions of characters long.
Does the string contains any characters the terminal would interpret, such as "\r"?
>perl -le"print qq{aaaaaaaa\rbbbbb}" bbbbbaaa [download]