5 ms·
I think you've missed specifying the filename, but otherwise cool. Here's Ruby for comparison: file_content = IO.read(filename) file_lines = IO.read(file
by cubicle67 17y ago
I think you've missed specifying the filename, but otherwise cool.
Here's Ruby for comparison:
file_content = IO.read(filename)
file_lines = IO.read(filename).split("\n")
- deleted 17y ago[deleted]
- regularfry 17y agofile_lines = File.readlines(filename) Not that it matters hugely :-)