how I could split a hash in ruby? -
im trying split hash not nothing
this code
   start="1,4,1,0,1,1,1,30,12,;1,4,1,2,1,1,1,30,29,;1,5,1,2,0,1,1,30,29,;1,4,1,2,0,1,1,30,29,;1,4,1,0,1,1,1,30,29,;"   options = {"start" => "1,4,1,0,1,1,1,30,12,;1,4,1,2,1,1,1,30,29,;1,5,1,2,0,1,1,30,29,;1,4,1,2,0,1,1,30,29,;1,4,1,0,1,1,1,30,29,;"}     file.open("mmmm3", "a" )do |f|       f.puts #{options[start]}.split(";")[1]  end please me this
options[start] returns string. problem have mistakenly commented out code. remove #{ , }. want print 
options[start].split(";")[1] which contain second group (since [0] return first)
Comments
Post a Comment