while (<$outFile>) { chomp; $lno++; @line = split(/\t/, $_); ## $line[0] is for the first column push (@idmatrix, $line[0]) if (0 == $lno % 2){ ## Trying to store the even columns apart from the first column values } else if (1 == $lno % 2){ ## Trying to store the odd columns apart from the first column values } } } shift @idmatrix; ## To delete the first row (Is there any other way to ## delete the first row of the file)