37,742
社区成员
发帖
与我相关
我的任务
分享use strict;
use warnings;
use IO::File;
my $f1=new IO::File("< f:\\f1");
my $f2=new IO::File("< f:\\f2");
my ($line1,$line2);
my $counter=1;
while(($line1=<$f1>) && ($line2=<$f2>))
{
chomp($line1);
chomp($line2);
if(substr($line1,length($line1)-15) eq substr($line2,length($line2)-15))
{
print("line $counter is equal.\n");
}
++$counter;
}