Such a thing as End Of Variable when reading from var? Like EOF when reading from file?
Posted on 2006-04-05
I'd like to be able to read from a variable, line by line, w/o having to first count the number of lines in the variable. Loop until EOF works great when reading from a file via line input and it'd be great if I could use something similar to that when reading from a variable (line by line).
I'm asking because I need to "flip" the contents of a .txt file and make the bottom (last entry) the top (first) and vice-versa. The only way I know how to do this is to read the file, line by line and dump it into a new file (or back into its own). Thanks.