Problem with initializing a hash in ruby

Posted by Cyborgo on Stack Overflow See other posts from Stack Overflow or by Cyborgo
Published on 2010-06-09T21:52:08Z Indexed on 2010/06/09 22:52 UTC
Read the original article Hit count: 186

Filed under:

Hi,

I have a text file from which I want to create a Hash for faster access. My text file is of format (space delimited)

author title date popularity

I want to create a hash in which author is the key and the remaining is the value as an array.

created_hash["briggs"] = ["Manup", "Jun,2007", 10]

Thanks in advance.

© Stack Overflow or respective owner

Related posts about ruby