Read a file into an array using Perl

后端 未结 4 1169
情书的邮戳
情书的邮戳 2020-12-31 06:25

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

4条回答
  •  -上瘾入骨i
    2020-12-31 07:14

    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.

提交回复
热议问题