![]() |
|
Perl Monk, Perl Meditation | |
PerlMonks |
When can the character length of a Perl Scalar become an issue?by misterperl (Pilgrim) |
on Sep 20, 2023 at 12:53 UTC ( #11154543=perlquestion: print w/replies, xml ) | Need Help?? |
misterperl has asked for the wisdom of the Perl Monks concerning the following question:
I'm creating an XML array with Perl. One line of the XML can potentially contain many characters. Generally it's not an issue. But sometimes the line gets truncated at some arbitrary point, like:
I save the line in a scalar array element, then print the entire array. The result has the begin and end tag, but the line in the middle is truncated. In the last fail, it truncated at 23,052 characters which didn't seem like a particularly significant number. In other cases the line greatly exceeds that length, without truncation. Ideas of why this happens on some lines and not others, or better ways to save these long lines with are appreciated. Maybe more than one tag? I studied MAX XML tag-contents restrictions, as well as Perl scalar length limits, and I don't see any specific limits.
Back to
Seekers of Perl Wisdom
|
|