欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

perl實(shí)現(xiàn)的兩個(gè)文件對比并對數(shù)據(jù)進(jìn)行篩選的腳本代碼

 更新時(shí)間:2013年03月20日 23:03:21   作者:  
對比兩個(gè)文件并對數(shù)據(jù)進(jìn)行篩選的perl腳本,涉及到哈希的應(yīng)用和perl編程風(fēng)格的改變。有需要的朋友可以參考下
復(fù)制代碼 代碼如下:

#!/usr/bin/perl
my %scyjm; 
open (CONTACT,"f:\\perl\\f.txt")||die("can not open the file!");  
while (<CONTACT>) 

  next if /^#/;#if($_=~/^#/的簡寫 
  chomp; 
  my @information =split;# my @information=split/\s+/,$_;的簡寫 
  next if(($information[1]=~/\./) && ($information[2]=~/\./)); 
  $scyjm{$information[13]}->{$information[0]}=$information[3]; 

close CONTACT; 
open (SC,"f:\\perl\\a.csv")||die("can not open the file!"); 
while(<SC>) 

   chomp; 
   my @sc=split; 
   if ( $scyjm{$sc[1]}{$sc[2]}) 
   { 
      print "$sc[0] $sc[1] $sc[2] $sc[3] $sc[4] $sc[6] $yjm[6]\n"; 
   } 
}

相關(guān)文章

最新評論