Perl_默认变量_$_and_@_

前端之家收集整理的这篇文章主要介绍了Perl_默认变量_$_and_@_前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

Perl_默认变量_$_and_@_

 

cat file1
A\t2\t7\tD
B\t4\t2\tC
D\t2\t4\tE

 


my $fil=/dir/file1;
open IN,$fil || die "$!\n";
while(<IN>) {
    chomp;
    split(/\n/,$_,2);
    print $_[0];
    print "!!!";
    print $_[1];
    print "\n";
}

A!!!2\t7\tD B!!!4\t2\tC D!!!2\t4\tE

猜你在找的Perl相关文章