Keep It Simple, Stupid | |
PerlMonks |
Re: fetching array of array, using a loopby shmem (Chancellor) |
on Jun 26, 2007 at 23:05 UTC ( [id://623508]=note: print w/replies, xml ) | Need Help?? |
Unclear spec:
These pushed values in a set of 4, can be any no of times in the last place of each input line. But in your "Desired output" block there's only one set of four on a line? Then there's a line break, and the next line contains the continuation? Is that really what you want, or do you want the elements at index 7 in each array ref on one line? Then, you have those coordinate blocks neatly left-aligned at column 34. Is that a requirement? I'll assume it is. At line 65, put brackets around @tmp, otherwise you will have a flat list in @finalarr. From line 11 on things are getting messy. No need to dereference $cordinate_r into @refer, so no need for line 13. To get at the data:
Output:
Be consistent with the alignment of your curlies! There's more to 'go all perlmonks on you', no time now... look for an update of this node. --shmem
In Section
Seekers of Perl Wisdom
|
|