perl读取文件内容时跳过第一行。
代码:
#!/bin/perl
#site: WWW.jb200.com
#
open READ,"<","G:/project-xiaomai/yourfile.txt";
readline READ; # skip the first line
while (<READ>)
{
print $_;
}
close READ;
附,perl一次读取多行内容。
代码:
#!/bin/perl
#site: WWW.jb200.com
#
open (TEST, "$infile")
while (<TEST>)
{ my $line_1=$_;
my $line_2=<TEST>;
my $line_3=<TEST>;
my $line_4=<TEST>;
}