• perl 处理文本


    redis01:/root# cat abc
    GET /api/sale/get_voucher_list?loupan_id=32300&suid=kJIjl&loupan_site=sc&code=d30d52a87c0ba4e342c9315d44845be5&source=pc HTTP/1.1
    GET /api/sale/get_voucher_list?loupan_id=108578&loupan_site=huizhou&code=26f3cdc956828768a54c334eb76770f5&source=pc HTTP/1.1
    GET /api/sale/get_voucher_list?loupan_id=107499&loupan_site=dg&code=e22b6dd312cd2921adc0788578345615&source=pc HTTP/1.1
    GET /api/sale/get_voucher_list?loupan_id=103399&loupan_site=nb&code=ccc411746f3505ea8fe5ecef6b2657ce&source=pc HTTP/1.1
    POST /api/sale/get_voucher_list?loupan_id=103399&loupan_site=nb&code=ccc411746f3505ea8fe5ecef6b2657ce&source=pc HTTP/1.1
    GET /index.php/Site/Index/room_id/1206?wt_source=newshp_twzb_05 HTTP/1.1
    GET /rss/detail/jinri/6154165177643499905.html?source=jrtt HTTP/1.1
    GET /rss/detail/jinri/6153808754283709277.html?source=jrtt HTTP/1.1
    GET /rss/detail/jinri/6154162659391767265.html?source=jrtt HTTP/1.1
    GET /sso/cookies.php?callback=_1467350571428134&uid=140812417 HTTP/1.1
    GET /sso/cookies.php?callback=_1467350571421134&uid=140812117 HTTP/1.1
    GET /sso/cookies.php?callback=_14673505734551134&uid=141234522117 HTTP/1.1
    GET /sso/cookies.php?callback=_146711135411428134&uid=14112322117 HTTP/1.1
    GET /index.php/Site/Index/room_id/1116?wt_source=newshp_twzb_05&max=123 HTTP/1.1
    GET /index.php/Site/Index/room_id/1356?wt_source=newshp_twzb_03 HTTP/1.1
    redis01:/root# perl a1.pl 
    GET /rss/detail/jinri/6154162659391767265.html?source=jrtt HTTP/1.1
    GET /index.php/Site/Index/room_id/1356?wt_source=newshp_twzb_03 HTTP/1.1
    GET /index.php/Site/Index/room_id/1206?wt_source=newshp_twzb_05 HTTP/1.1
    GET /rss/detail/jinri/6154165177643499905.html?source=jrtt HTTP/1.1
    POST /api/sale/get_voucher_list?loupan_id=103399&loupan_site=nb&code=ccc411746f3505ea8fe5ecef6b2657ce&source=pc HTTP/1.1
    GET /rss/detail/jinri/6153808754283709277.html?source=jrtt HTTP/1.1
    GET /sso/cookies.php?callback=_146711135411428134&uid=14112322117 HTTP/1.1
    GET /index.php/Site/Index/room_id/1116?wt_source=newshp_twzb_05&max=123 HTTP/1.1
    redis01:/root# cat a1.pl 
              open (LOG ,"<","abc");  
                  while (<LOG>) {  
                            chomp; 
                            if ($_ =~ /s*(POST|GET)s+(.*?)?.*/){
                            $hash{$2}=$_;
                            };
                          }; 
            while(my($a, $b) = each %hash) 
                   {
                     print $b."
    ";
                     };

  • 相关阅读:
    Django 三(路由)
    Django 二
    Django基础知识
    jquery值,属性,类的操作 文档的操作
    jquery事件对象 , 链式编程,选择器和过滤器,动画;js和jquery互转
    MySQL-1-简介-安装流程
    前端 里的面向对象
    篇二:JS身份证校验
    HTML5属性--(capture="camera") 上传照片或者打开手机相机
    SpringMVC @RequestBody接收Json对象字符串
  • 原文地址:https://www.cnblogs.com/hzcya1995/p/13350526.html
Copyright © 2020-2023  润新知