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

本文共 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/6199750.html

你可能感兴趣的文章
0038-算一算是一年中的第几天
查看>>
51nod 1094 【水题】
查看>>
003.第一个动画:绘制直线
查看>>
ng-深度学习-课程笔记-2: 神经网络中的逻辑回归(Week2)
查看>>
正则表达式的搜索和替换
查看>>
个人项目:WC
查看>>
地鼠的困境SSL1333 最大匹配
查看>>
flume+elasticsearch+kibana遇到的坑
查看>>
【MM系列】在SAP里查看数据的方法
查看>>
C#——winform
查看>>
CSS3 transform制作的漂亮的滚动式导航
查看>>
《小强升职记——时间管理故事书》读书笔记
查看>>
Alpha 冲刺(3/10)
查看>>
Kaldi中的Chain模型
查看>>
spring中的ResourceBundleMessageSource使用和测试示例
查看>>
css规范 - bem
查看>>
UVALive 6145 Version Controlled IDE(可持久化treap、rope)
查看>>
mysql 将两个有主键的表合并到一起
查看>>
底部导航栏-----FragmentTabHost
查看>>
在linux中安装jdk以及tomcat并shell脚本关闭启动的进程
查看>>