mojo 编码处理

mojo ut8: [root@jxglapp1 pfwx-master]# vim mojo.pl [root@jxglapp1 pfwx-master]# You have new mail in /var/spool/mail/root [root@jxglapp1 pfwx-mast...

2017-03-13 10:07:11

阅读数:209

评论数:0

perl mojo 编码

mojo 默认开启utf8; centos6.5:/root#cat t1.pl use Mojolicious::Lite; use JSON qw/encode_json decode_json/; use Encode; no strict; use JSON; ...

2017-03-09 21:03:04

阅读数:148

评论数:0

perl mojo use utf8 和no utf8

mojo utf8 centos6.5:/root#cat t1.pl use Mojolicious::Lite; use JSON qw/encode_json decode_json/; use Encode; no strict; use JSON; use ...

2017-03-09 14:05:14

阅读数:104

评论数:0

perl 定义post接口

[root@wx03 mojo]# cat a1.pl use Digest::MD5; my $md5 = Digest::MD5->new; $md5->add(1234567); print $md5->hexdigest."\n"; [root@wx...

2016-10-21 12:41:57

阅读数:468

评论数:0

use utf8

[root@wx03 0724]# cat a2.pl use Encode; my $a=; my $b=encode_utf8('微信'); print "\$b is $b\n"; if ($a =~/$b/){print "success\n";}...

2016-07-24 13:43:47

阅读数:231

评论数:0

utf8字节

[root@wx03 0724]# perl a1.pl 112 [root@wx03 0724]# perl a1.pl dawe^H^H微信adda success [root@wx03 0724]# perl a1.pl 22微信3131 success [root@wx03 072...

2016-07-24 13:18:35

阅读数:189

评论数:0

perl 定义post接口

use Mojolicious::Lite; use JSON qw/encode_json decode_json/; use Encode; no strict; use JSON; use Data::Dumper; #no utf8; # /foo?user=sri post '...

2016-07-01 10:59:02

阅读数:333

评论数:0

测试关闭mojo 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 ut...

2016-06-30 20:11:28

阅读数:249

评论数:0

mojo 关闭utf8

[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 u...

2016-06-30 19:58:50

阅读数:178

评论数:0

mojo 默认启用utf-8

[root@dr-mysql01 ~]# cat f1.pl use Encode; print "验证111\n"; my $d=encode_utf8('验证'); print $d; print "\n"; [root@dr-mysql01 ~]# ...

2016-06-30 19:24:49

阅读数:212

评论数:0

Mojo 分析日志接口

#!/usr/bin/perl #取文件行数 ##循环开始清空文件 use POSIX; use DBI; my $dir = '/data01/applog_backup'; my $file = "$ARGV[0]"; my $SDATE = strftime("...

2016-06-17 14:26:21

阅读数:231

评论数:0

Mojo Mysql utf-8字符集 需要{mysql_enable_utf8 => 1}

get '/api/log_mon/get_log' => sub{ my $c = shift; my $env = $c->param('env'); my $host = $c->param('host'); use DBI; my $dbUser=...

2016-06-17 12:36:58

阅读数:505

评论数:0

Mojo 自动发布接口

get '/api/auto_publish/publish' => sub{ my $c = shift; my $env = $c->param('env'); my $app = $c->param('app'); my $ip = $c->param('ip...

2016-05-05 09:31:37

阅读数:260

评论数:0

Mojo 返回一维和二维数组

这种情况不断的网数组@arr2里放入数据,返回的内容为: 这种情况是一维数组: while( $selStmt->fetch() ){ print "\$a1 is $a1\n"; print "\$a2 is $a2\n"; print &quo...

2016-05-04 15:46:30

阅读数:220

评论数:0

zabbix 添加主机接口

http://192.168.32.101:3000/api/zabbix/add_Host?env=test&host=zjtest9-app&ip=192.168.32.250&groupid=11&templateid=10001 my $c = sh...

2016-05-03 16:15:05

阅读数:1034

评论数:0

mojo 接口返回键值对的json格式

my $c = shift; use DBI; my %hash=(); my $dbUser='zabbix'; my $user="root"; my $passwd="1234567"; my $dbh = DBI->connec...

2016-05-03 12:55:19

阅读数:319

评论数:0

mojo 默认use utf8;

my $endtime=strftime("%Y%m%d%H%M%S",localtime()); my $d=encode_utf8('验证'); if ($a3 =~/$d/){ #$msg->reply("\@$friend $a1-$a3-...

2016-05-03 09:02:04

阅读数:355

评论数:0

perl 使用use utf8

jrhapt12:/home/tomcat> cat a1.pl use Encode; $phone='18072722237'; open (LOG1 ,"<",'/usr/local/apache-tomcat-7.0.55_8082/logs/catalin...

2016-05-01 09:47:22

阅读数:328

评论数:0

perl 解json数组

http://115.236.160.82:3000/api/bus?bus=307&flag=1 返回json是: 其实就是数组的引用编码成json ["","黄龙体育中心","教工路花园亭","花园新村&quo...

2016-03-25 20:26:51

阅读数:491

评论数:0

mojo 接口示例

use Mojolicious::Lite; use JSON qw/encode_json decode_json/; use Encode; no strict; # /foo?user=sri get '/api/env' => sub { my $c = shift; ...

2016-03-25 16:58:56

阅读数:762

评论数:0

提示
确定要删除当前文章?
取消 删除
关闭
关闭