博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
mojo 关闭utf8
阅读量:4438 次
发布时间:2019-06-07

本文共 5486 字,大约阅读时间需要 18 分钟。

[root@wx03 ~]# cat test.pl use Mojolicious::Lite;use JSON qw/encode_json decode_json/;  use Encode;no strict;use JSON; use Data::Dumper;#no  utf8;# /foo?user=sri get '/admin/api/menu' => sub {          my $c = shift;          print "测试更健康\n";         open (LOG1 ,"<",'/data01/applog_backup/zj-api01-catalina.out') or die  $!;                     while (
) { my $phone='18072722237'; #2016-03-09 09:35:12,380 INFO com.zjzc.thirdparty.sms.SMSUtils - Send message:您的验证码为132435,本验证码5分钟内有效。 to phoneNo:18072722237 succeed! if ( ($phone) and ($_ =~/$phone/) and ($_ =~/SMSUtils/) ){$str=$_; # my $d=encode_utf8('验证'); my $d='验证'; print "1-------\$str is $str\n"; next if ($str !~ /$d/); print "2--------\$str is $str\n"; push (@arr1 ,$str); }}; close LOG1; $c->render(text => "测试更健康" );}; app->start; 此时接口返回; [root@wx03 ~]# morbo test.pl Server available at http://127.0.0.1:3000[Thu Jun 30 19:50:58 2016] [debug] GET "/admin/api/menu"[Thu Jun 30 19:50:58 2016] [debug] Routing to a callbackWide character in print at /root/test.pl line 11.测试更健康1-------$str is 2016-04-22 11:02:01,259 INFO com.zjzc.thirdparty.sms.SMSUtils - Send message:您的验证码为813231,本验证码30分钟内有效。 to phoneNo:18072722237 succeed!1-------$str is 2016-04-22 11:02:01,259 INFO com.zjzc.thirdparty.sms.SMSUtils - Send message:您的813231,本验证码30分钟内有效。 to phoneNo:18072722237 succeed!1-------$str is 2016-04-22 11:02:01,259 INFO com.zjzc.thirdparty.sms.SMSUtils - Send message:您的813231,本验证码30分钟内有效。 to phoneNo:18072722237 succeed![Thu Jun 30 19:50:58 2016] [debug] 200 OK (0.00104s, 961.538/s)/******[root@wx03 ~]# cat test.pl use Mojolicious::Lite;use JSON qw/encode_json decode_json/; use Encode;no strict;use JSON; use Data::Dumper;#no utf8;# /foo?user=sri get '/admin/api/menu' => sub { my $c = shift; print "测试更健康\n"; open (LOG1 ,"<",'/data01/applog_backup/zj-api01-catalina.out') or die $!; while (
) { my $phone='18072722237'; #2016-03-09 09:35:12,380 INFO com.zjzc.thirdparty.sms.SMSUtils - Send message:您的验证码为132435,本验证码5分钟内有效。 to phoneNo:18072722237 succeed! if ( ($phone) and ($_ =~/$phone/) and ($_ =~/SMSUtils/) ){$str=$_; my $d=encode_utf8('验证'); # my $d='验证'; print "1-------\$str is $str\n"; next if ($str !~ /$d/); print "2--------\$str is $str\n"; push (@arr1 ,$str); }}; close LOG1; $c->render(text => "测试更健康" );}; app->start; [root@wx03 ~]# morbo test.pl Server available at http://127.0.0.1:3000[Thu Jun 30 19:52:38 2016] [debug] GET "/admin/api/menu"[Thu Jun 30 19:52:38 2016] [debug] Routing to a callbackWide character in print at /root/test.pl line 11.测试更健康1-------$str is 2016-04-22 11:02:01,259 INFO com.zjzc.thirdparty.sms.SMSUtils - Send message:您的验证码为813231,本验证码30分钟内有效。 to phoneNo:18072722237 succeed!2--------$str is 2016-04-22 11:02:01,259 INFO com.zjzc.thirdparty.sms.SMSUtils - Send message:您的验证码为813231,本验证码30分钟内有效。 to phoneNo:18072722237 succeed!1-------$str is 2016-04-22 11:02:01,259 INFO com.zjzc.thirdparty.sms.SMSUtils - Send message:您的813231,本30分钟内有效。 to phoneNo:18072722237 succeed!1-------$str is 2016-04-22 11:02:01,259 INFO com.zjzc.thirdparty.sms.SMSUtils - Send message:您的813231,本30分钟内有效。 to phoneNo:18072722237 succeed![Thu Jun 30 19:52:38 2016] [debug] 200 OK (0.001048s, 954.198/s)/************ 关闭utf-8[root@wx03 ~]# cat test.pl use Mojolicious::Lite;use JSON qw/encode_json decode_json/; use Encode;no strict;use JSON; use Data::Dumper;no utf8;# /foo?user=sri get '/admin/api/menu' => sub { my $c = shift; print "测试更健康\n"; open (LOG1 ,"<",'/data01/applog_backup/zj-api01-catalina.out') or die $!; while (
) { my $phone='18072722237'; #2016-03-09 09:35:12,380 INFO com.zjzc.thirdparty.sms.SMSUtils - Send message:您的验证码为132435,本验证码5分钟内有效。 to phoneNo:18072722237 succeed! if ( ($phone) and ($_ =~/$phone/) and ($_ =~/SMSUtils/) ){$str=$_; # my $d=encode_utf8('验证'); my $d='验证'; print "1-------\$str is $str\n"; next if ($str !~ /$d/); print "2--------\$str is $str\n"; push (@arr1 ,$str); }}; close LOG1; $c->render(text => "测试更健康" );}; app->start; 接口返回; [root@wx03 ~]# morbo test.pl Server available at http://127.0.0.1:3000[Thu Jun 30 19:55:09 2016] [debug] GET "/admin/api/menu"[Thu Jun 30 19:55:09 2016] [debug] Routing to a callback测试更健康1-------$str is 2016-04-22 11:02:01,259 INFO com.zjzc.thirdparty.sms.SMSUtils - Send message:您的验证码为813231,本验证码30分钟内有效。 to phoneNo:18072722237 succeed!2--------$str is 2016-04-22 11:02:01,259 INFO com.zjzc.thirdparty.sms.SMSUtils - Send message:您的验证码为813231,本验证码30分钟内有效。 to phoneNo:18072722237 succeed!1-------$str is 2016-04-22 11:02:01,259 INFO com.zjzc.thirdparty.sms.SMSUtils - Send message:您的813231,本30分钟内有效。 to phoneNo:18072722237 succeed!1-------$str is 2016-04-22 11:02:01,259 INFO com.zjzc.thirdparty.sms.SMSUtils - Send message:您的813231,本30分钟内有效。 to phoneNo:18072722237 succeed![Thu Jun 30 19:55:09 2016] [debug] 200 OK (0.001001s, 999.001/s)

转载于:https://www.cnblogs.com/zhaoyangjian724/p/6199751.html

你可能感兴趣的文章
mac 搭建virtualenv的那些坑
查看>>
多路复用IO模型
查看>>
并发、串行、并行及多道技术原理
查看>>
hashlib、pickle、hmac、logging模块使用
查看>>
javascript常用知识点总结
查看>>
2019秋招复习笔记--数据库基本操作
查看>>
2019秋招复习笔试--手写代码
查看>>
2019秋招复习笔记--智力题
查看>>
MySQL学习笔记
查看>>
2019秋招面试复习 项目重点提问
查看>>
面试题
查看>>
DS博客作业08-课程总结
查看>>
利用Python爬虫刷店铺微博等访问量最简单有效教程
查看>>
浅谈软件测试与墨菲定律
查看>>
文件安全复制之 FastCopy
查看>>
强烈推荐美文之《从此刻起,我要》
查看>>
MYSQL中数据类型介绍
查看>>
评估软件上线标准
查看>>
敏捷开发流程
查看>>
APP兼容性测试(三)测试方案设计
查看>>