in reply to Re: How not to remove trailing empty strings from an arrayin thread How not to remove trailing empty strings from an array
My actual fix was
pop @msgstr while @msgstr && !length($msgstr[-1]); [download]