perl to display a matrix report for 3-dimenional array

Hi All,

@arrayTime = [time1, time2, time3, ......]   where time value has format like 20150710 10:24:10
@arrayID = [ id1, id2, id3, id4, .......  id15]            
@arrayPrice = [  Value1, Value2, Value3 ..... Value15]

I will like to produce a Matrix Report like below

                  id1              id2             id3 .......                id15
time1        value11     value21     vaue31                 value151
time2        value21     value22 ....
time3

Thanks

David
tindavidAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

wilcoxonCommented:
Please provide more information.

You show @arrayPrice as having 15 values which your desired output shows as enough values to populate only one time row.  Where are the other values coming from?

In order to relate a value to a time and id, there must be some way to relate them.  Since @arrayID and @arrayPrice both have 15 values, I'm assuming the ordering of values matches the ordering of ids - is that correct?  How do you know which time the values relate to?
ozoCommented:
use warnings;
no strict "subs";
my @arrayTime = (time1, time2, time3);
my @arrayID = ( id1, id2, id3, id4, '.......',  id15);
my @arrayPrice = (
 [qw(value11     value21     vaue31                 value151)],
 [qw(value21     value22 .... )],
);
use strict;
$"="\t";
print "\t@arrayID\n";
print "$arrayID[$_]\t@{$arrayPrice[$_]||[]}\n" for 0..$#arrayTime;

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
tindavidAuthor Commented:
greate!
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Perl

From novice to tech pro — start learning today.