I am currently reading a file and storing the data in an array named @lines. Then, I loop through this array using a for loop and inside the loop I
@lines
for
Use Tie::File. It loads the file into an array, which you can manipulate using array operations. When you untie the file, its components will be saved back in the file.