in reply to map question

How can you have next without a loop? Please, show us all the relevant code.

Having said that, length expects a scalar, so your map is evaluated in scalar context, returning the number of elements it processed. It is that number that is used as the argument to length. So, unless @fields contains 10 ** 15 elements, it's length will be less than 15 and next will be executed.

<clpm>
Please, for your next question, give us a small, complete program that we can run, rather than a snippit of something bigger, especially at this time on Saturday night ;)
</clpm>