readline reads one line of text from an input stream. The stream may be a file, the keyboard through stdin, or another Julia I/O object. section 5.0 section 17.1
Read a file one line at a time
Open a CSV file, then call readline(io) repeatedly. The first calls return lines such as "name,size,price" and "hawaiian,S,10.5". Combine readline with eof to stop at the end.
Read keyboard input
Calling readline(stdin) waits for a line typed into the terminal and returns it as text. Store the result, then print or process it. section 5.3.2
A practical line-reading workflow is:
- Split each returned line when it contains delimited fields. section 17.1
- Parse numeric or Boolean fields because readline returns text rather than typed values. section 5.3.2
- Close the I/O object after processing to avoid leaking operating-system resources. section 17.1



