I was wondering if it is possible to read from a text file one line at a time. I am doing a combination perl/python unofficial course at school, and the instructor told us to go to the internet for help. Of course, all the google search/perlmonks results just say to use the whole file, which is not an option. Our current assignment is to create a MadLib, but the file containing the words for the madlib contains 4 MadLibs worth of words(and is a read only file). Each MadLib worth is on a line, so how does one read text one line at a time?
Update: I don't think I was entirely clear. What I need to do is read a single line of multiple strings(CSV formatted) into an array, so is there a way to do that?
In reply to Read from a file one line at a time? by john.perry.14
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |