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 [].
In reply to Re: making a text file to an hash array
by rovf
in thread making a text file to an hash array
by changma_ha
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |