actually chomp() returns the number of "characters" that were chomped - not the delimiters.
You're right of course. (But your over elaborate demonstration added nothing to the simple statement of fact.)
I remember discovering early on that the return from chomp wasn't useful and I've never concerned myself with what non-useful thing it actually returned ever since.
So the OP's code is not going to work...
That was the point I was making when I said: "Neither snippet will do what you think it will do.".
In reply to Re^3: using function output ananymous array vs. named array in foreach
by BrowserUk
in thread using function output ananymous array vs. named array in foreach
by ISAI student
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |