is there a way to read a file not line by line because i want to loop through stuff w/o using variables but i have to find the right data in the file, and the data are separated by a boundry expression, but the boundaries for each peice of data are on different lines(togh). What im doing now is saving the file to an array by lines then turning the array into a string and then search the string for the boundries and save the stuff between and later print. I would like to find a way without saving the whole file into an array but because i need to find sruff on diff lines i cant loop through it.SORRY THIS IS REALLY HARD TO UNDERSTAND SO HERE IS A SUMMARY. I want to loop through data in a file but need to find data in multiple lines.EXAMPLE
what could i do to save the 1s 2s and 3s in an array without saving the whole file to an array line by line, then turning it into a string and then match and push the data onto an array?