perl 读取文本文件 跳过开头1行或几行 (perl read file skip first line or a few lines)
一直在想办法,如何在perl读取文本文件时,跳过第一行(采用更好的方法)。上网搜了搜,发现有不少人回答类似的问题,但是方法都不尽如人意。 现将网上的一些常见方法罗列下(虽然还有其它写法,但是它们在本质上都是一些)。 比如说,
open(FH,$yourfile)ordie"Can'topen$yourfile:$!\n";
while(){
nextif/pattern_ind