Dec 16, 2000, 4:41 PM
Post #8 of 11
I beg to differ, cir. 4-argument substr() modifies the string, and I'm reading 30 character chunks and replacing them with nothing (effectively destroying the string, by the way).
If you try my code, you'll see the while-loop does terminate, because eventually, $string becomes empty:
The output I receive is:
$text = join "", 'a' .. 'z';
$chunk = 7;
print "CHUNK: ", substr($text, 0, $chunk, ""), "\n"
while $text ne "";
If you ran my code and got errors, I'd like to know what they were, but I think you jumped the gun when you found "bugs" in my code.
Jeff "japhy" Pinyan -- accomplished hacker, teacher, lecturer, and author