go ahead... be a heretic | |
PerlMonks |
Re: Best way to read in an XbyX table into a Hash{Key}{Key2}[value] structureby rjt (Curate) |
on Aug 07, 2013 at 19:01 UTC ( [id://1048414]=note: print w/replies, xml ) | Need Help?? |
(c/p from excel sheet) Given that, you may want to consider Spreadsheet::ParseExcel to read the data in directly from your Excel spreadsheet. Edit: Thanks to the OP for helping me understand the requirements. I now believe this will be much more in line with what you're after:
Previous line-based (i.e., row major) suggestion is below. Otherwise, parsing the plain text you've provided is fairly straightforward as well:
However, whether that's actually an improvement on your code or not is debatable. :-)
In Section
Seekers of Perl Wisdom
|
|