in reply to How to fill a template values from a excel using perl?

You have some work to do.
However, if you wind up with an array as you show, code like this might be useful to you..
Other code can be used to translate a row,column to column,row.
Make some kind of attempt at your code and post it here and you will get a lot of help.
Your code does not have to be "pretty" or even completely work. Trying is important.
#!/usr/bin/perl use strict; use warnings; my @array = qw(5 4 6 6 2 3 4 9 1 2 4 5); my (@blue, @red, @green, @orange); while (@array) { my ($blue, $red, $green, $orange) = splice(@array,0,4); push @blue, $blue; push @red, $red; push @green, $green; push @orange,$orange; } print "Blue = @blue\n"; print "Red = @red\n"; print "Green= @green\n"; print "Orange = @orange\n"; __END__ Blue = 5 2 1 Red = 4 3 2 Green= 6 4 4 Orange = 6 9 5