I have a VERY long string of numbers (1000 characters). I would like to break it down into chucks of 5 and insert into an array arr
.
str = "7316717653133062491922511967442657474206326239578318016 ..."
I tried each_slice
but when I attempt to require 'enumerator'
#=> irb says: false
str.each_slice(5).to_a
I would like the output to look like:
arr = [ "73167", "17653", "33062", ... ]
How can this be attained?