in reply to reuse of split variable?

"Is Perl storing the string to split on a buffer so you can reuse storaging space? "

Don't feel this question is related to the fact you can reusing @fields.

You can store the returned result from split in @fields any time you want, as many times as you want. Nothing different from c.

The string that split works on is passed in as parameter, is it not the same thing in c? BTW as it is not passed in as ref (or pointer as in c), once you passed it in, the copy inside the sub has nothing to do with the oringinal string from where split copied its value.

From a c programmer's point of view, the only thing might surprise you is the fact that @fields is growing on its own without you explicitly allocate memory for it.