```ruby
lines = data.lines
lines.each do |line|
  line.strip!
  ...
end