演示代码   下载
openoffice 编译依赖关系履历#/usr/bin/perl -w
openoffice 编译依赖关系履历
sub readline{
openoffice 编译依赖关系履历    
print $_[0],"\n";
openoffice 编译依赖关系履历    
if (open(FILE1,"Qlist.txt"))
openoffice 编译依赖关系履历    {
openoffice 编译依赖关系履历        
while(<FILE1>)
openoffice 编译依赖关系履历        {
openoffice 编译依赖关系履历            
if($_=~/^$_[0]/)
openoffice 编译依赖关系履历            {
openoffice 编译依赖关系履历                s
/NULL//;
openoffice 编译依赖关系履历                s
/\n//;
openoffice 编译依赖关系履历                
close(FILE1);
openoffice 编译依赖关系履历                
return $_;
openoffice 编译依赖关系履历            }            
openoffice 编译依赖关系履历        }
openoffice 编译依赖关系履历    }
openoffice 编译依赖关系履历    
close(FILE1);
openoffice 编译依赖关系履历    
return "$_[0] :";
openoffice 编译依赖关系履历}
openoffice 编译依赖关系履历
print "Put in one model:";
openoffice 编译依赖关系履历
$putin=<>;
openoffice 编译依赖关系履历
$putin=~s/\n$//;
openoffice 编译依赖关系履历
$modellist=&readline($putin);
openoffice 编译依赖关系履历
while($modellist=~m/\b(\w+)\b(?! :)/){
openoffice 编译依赖关系履历    
my $tmp=&readline($1);
openoffice 编译依赖关系履历    
$modellist=~s/\b(\w+)\b(?! :)/$tmp/;
openoffice 编译依赖关系履历}
openoffice 编译依赖关系履历    
if (open(OUTFILE,">OKlist.txt"))
openoffice 编译依赖关系履历    {
openoffice 编译依赖关系履历    
print OUTFILE ($modellist);    
openoffice 编译依赖关系履历    
close(OUTFILE);
openoffice 编译依赖关系履历    }    
openoffice 编译依赖关系履历
Qlist.txt  依赖关系例子
openoffice 编译依赖关系履历vcl :  a b c NULL
openoffice 编译依赖关系履历a : a1 NULL
openoffice 编译依赖关系履历b : b1 NULL
openoffice 编译依赖关系履历c : d NULL
openoffice 编译依赖关系履历a1 : NULL
openoffice 编译依赖关系履历b1 : NULL
openoffice 编译依赖关系履历d : e1 e2 NULL
openoffice 编译依赖关系履历e1 : NULL
openoffice 编译依赖关系履历e2 : NULL

oklist.txt 结果
openoffice 编译依赖关系履历vcl :  a : a1 :  b : b1 :  c : d : e1 :  e2 :  
openoffice 编译依赖关系履历

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-11-30
  • 2022-01-02
  • 2021-10-01
  • 2022-02-25
猜你喜欢
  • 2021-06-04
  • 2021-05-28
  • 2021-06-16
  • 2022-12-23
  • 2022-12-23
  • 2021-07-08
相关资源
相似解决方案