Use of uninitialized value $temparray[0] in concatenation (.) or string at test.pl line 14. Use of uninitialized value $temparray[0] in join or string at test.pl line 15. $temparray[0] is undefined. @temparray has 1 elements. $temparray[0] = @temparray =