Thanks for your fast reply !!! I use the open ( INPUT, .....) to read in the file and I want to seprate the 4 array's so something like this my @nloops = ...; my @lverts = ...; my @vertid = ...; my @paramslist = ...; so your code was nice to print this info but I like to asign it to 4 array ex. my @nloops = [ ... ]; my @lverts = [ ... ]; my @vertid = [ ... ]; my @params = [ ... ]; next I could count the array length this I know how to next I could build a for loop to assign 1 array and first value to new data format ... ex. change the data 0.5 0.5 0.5 add 1 -------- first array to output 0.5 0.5 0.5 1 Print some info here !!! 4 < 1 2 3 4 Print end info !!! so in another words the 4 arrays need to be seprate. ex. print @nloops; OUT 1,1,1,1,1 print @lverts; OUT 4,4,4,4,4 ...