I keep seeing Use of uninitialized value $filelist[3] when nothing is in field 3 of the array. I can turn warning off and all is good :-) -- but I would like to know the correct way of doing this please.

You and Shawn are discussing an alternate to the array slice that I used. The choice between them is clearly a matter of preference. I prefer the array slice because it emphasizes the fields that you want rather than the ones that you do not. The specification of the array slice itself can often be shortened with the use of the range operator.