good chemistry is complicated, and a little bit messy -LW |
|
PerlMonks |
Re: What is the difference?by Abigail-II (Bishop) |
on Apr 08, 2003 at 14:38 UTC ( [id://248947]=note: print w/replies, xml ) | Need Help?? |
Well, yeah, += doesn't do that. += doesn't multiple the
right hand side with the left hand side either.
You're the second person to assume something needs to be concatenated. Why, I have no idea. split doesn't return a string, it returns a number, and the program is counting things. I see no reason at all to come up with concatenation. To answer the question, split returns the number of fields. And if you split on [ \t]*, the number of fields isn't necessaryly the same as the number of characters. Abigail
In Section
Seekers of Perl Wisdom
|
|