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

In reply to Re: How to fill a template values from a excel using perl? by Marshall
in thread How to fill a template values from a excel using perl? by ksikder

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.