How to print an array of multidimensional arrays with a for or foreach loopby thanos1983 (Hermit)
|on Aug 10, 2014 at 23:25 UTC||Need Help??|
thanos1983 has asked for the
wisdom of the Perl Monks concerning the following question:
I came across this problem, that I am having an array with elements and another array inside the array. I have created a minimal sample of code to represent what I mean.
As a solution to my problem, I found to use all elements as an array. Sample of code and output provided under:
But this is a not a correct solution, there must be another way of printing this elements. Since Data::Dumper does it, there must be another way.
I have spend some time trying to figure it out, or by searching online but I could not found a solid solution, that is why I created my solution, although that I know it is not a good solution it was a solution to my problem.
So out of curiosity, I am asking if anyone has solved this problem earlier.
Thank you in advance for your time and effort reading and replying to my problem.
Seeking for Perl wisdom...on the process of learning...not there...yet!