清华大佬耗费三个月吐血整理的几百G的资源,免费分享!....>>>
#!/usr/bin/perl -w
#use strict; #严格perl的语法,使用它后所有变量必须都用my声明。
use CGI qw(:all);
open(FILE,"/var/www/html/wiretap/user_addr"); #open函数中传递的变量一定要大写例如FILE。
my $i = 1;
while(my $temp=<FILE>){
$user_addr[$i]=$temp;
$i++;
}
close(FILE);
open(FILE,"/var/www/html/wiretap/send_to");
my $j = 1;
while(my $temp=<FILE>){
$send_to[$j]=$temp;
$j++;
}
close(FILE);
open(FILE1,"/var/www/html/wiretap/user_addr"); #统计一个文件行数的方法。
my $n = 0;
while(<FILE1>){
$n++;
}
close(FILE1);
print "共有$n行\n";
for(my $i=1;$i<=$n;$i++){
print "$user_addr[$i]","$send_to[$i]";
}
exit (0);