empty-line indexes and items removal - ruby
Posted: Fri Jan 15, 2016 10:45 pm
Two arrays scenario.
array 1 contains some empty lines:
a1
b1
[empty line]
[empty line]
e1
f1
array 2 is full.
a2
b2
c2
d2
e2
f2
both arrays are identical in size.
in ruby:
1) How to get a list of indexes of empty lines in array 1?
2) How to use the list of (these) indexes, to remove corresponding lines in array 2?
p.s.: still on FS 3.8.
array 1 contains some empty lines:
a1
b1
[empty line]
[empty line]
e1
f1
array 2 is full.
a2
b2
c2
d2
e2
f2
both arrays are identical in size.
in ruby:
1) How to get a list of indexes of empty lines in array 1?
2) How to use the list of (these) indexes, to remove corresponding lines in array 2?
p.s.: still on FS 3.8.