RosettaCodeData/Task/Input-loop/Sidef/input-loop.sidef
2023-07-01 13:44:08 -04:00

8 lines
232 B
Text

var file = File(__FILE__)
file.open_r(\var fh, \var err) || die "#{file}: #{err}"
fh.each { |line| # iterates the lines of the fh
line.each_word { |word| # iterates the words of the line
say word
}
}