Don't ask to ask, just ask | |
PerlMonks |
Re: making a text file to an hash arrayby rovf (Priest) |
on Jul 14, 2010 at 10:47 UTC ( [id://849489]=note: print w/replies, xml ) | Need Help?? |
The main problem here seems to be the irregularity of empty hash values (i.e. d and e in your example). One possibility would be to split on white space, then manually loop through the array - if the array element starts with a letter, it is the hash key, and if the following array element starts with a digit, that is the value; otherwise the value would be [].
-- Ronald Fischer <ynnor@mm.st>
In Section
Seekers of Perl Wisdom
|
|