Just a quick note to document a funny error.
I tried to remove trailing empty strings from an array of strings with the following code.
pop @msgstr while !length($msgstr[-1]);
This didn't work. Can you guess why? Solution under the fold.
In reply to How not to remove trailing empty strings from an array by ambrus
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |