#!/usr/bin/perl -w
open (F1,"a.txt");
while ($a=) {
#print "$a","\n";
open (F2,"b.txt");
while () {
if (/($a)/) {
print "$. $_";
}
}
}
#!/usr/bin/perl -w
open (F1,"a.txt");
open (F2,"b.txt");
@a=;
@b=;
%seen=();
foreach (@a) {
$seen{$_}=1;
}
@reslut=grep ($seen{$_},@b);
print "@reslut";
阅读(1142) | 评论(0) | 转发(0) |