整个文件做为一个数组

use strict;
use warnings;
my($note,$med,@line,%hash);
open IN,"<","G:\\tomato\\OUT\\yaofang.txt";
@line=<IN>;
print @line; 
 
原文地址:https://www.cnblogs.com/blueicely/p/2816267.html