The first message means that your variable $ch actually is empty at that time in the loop.
The second means the same.
"substr outside of string" means you are trying to get at characters where there is no string left to get them from.
Imagine you're trying to get the second character of a string that's only one character long.
Cheerio, Sören
In reply to Re: Substr warning
by Happy-the-monk
in thread Substr warning
by New Novice
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |