Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: making a text file to an hash array

by rovf (Priest)
on Jul 14, 2010 at 10:47 UTC ( [id://849489]=note: print w/replies, xml ) Need Help??


in reply to making a text file to an hash array

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>

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://849489]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others rifling through the Monastery: (2)
As of 2024-04-24 23:14 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found