zoukankan      html  css  js  c++  java
  • openoffice 编译依赖关系履历

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

    oklist.txt 结果
    vcl :  a : a1 :  b : b1 :  c : d : e1 :  e2 :  

  • 相关阅读:
    PHP中读写文件
    HTMLmeta
    穷举密码序列(C#)
    多线程访问winform控件示例
    Web服务器
    [转]javascript 之 select下拉框
    大中小字体显示
    WPF中StringFormat的用法
    常用的 19 条 MySQL 优化
    resin部署安装
  • 原文地址:https://www.cnblogs.com/cpper/p/1572188.html
Copyright © 2011-2022 走看看