zoukankan      html  css  js  c++  java
  • perl 处理json 数组格式

    [root@dr-mysql01 ~]# cat a1.pl 
    use Encode;  
    use JSON;   
    use URI::Escape;  
    use LWP::Simple;  
    my $host = "http://192.168.32.101:3000/api/getcode?env=zj&phone=18072722237";  
    my $content = get($host);  
    print "$content  is $content
    ";  
      
      
    print "111111111111111111111
    ";
    print $content->[0]->[1];
    print "
    ";
    
    
    
    
    
    print "3333333333333333333333333
    ";
    my $array = decode_json($content);
    print $array->[0]->[1];
    print "
    ";
    
    
    [root@dr-mysql01 ~]# perl a1.pl 
    $content  is [["2016-04-27 13:04:30,325","您的验证码为956047,本验证码5分钟内有效。 ","to phoneNo:18072722237"],["2016-04-27 13:05:58,839","您的验证码为161980,本验证码5分钟内有效。 ","to phoneNo:18072722237"]]
    111111111111111111111
    
    3333333333333333333333333
    Wide character in print at a1.pl line 20.
    您的验证码为956047,本验证码5分钟内有效。
    
    



  • 相关阅读:
    绑定姿势
    Mesh.CombineMeshes
    Mono vs IL2CPP
    lua keynote2
    lua keynote
    游戏编程模式KeyNote
    架构、性能和游戏
    Canvas
    AssetBundle Manager
    Loading AssetBundle Manifests
  • 原文地址:https://www.cnblogs.com/zhaoyangjian724/p/6200132.html
Copyright © 2011-2022 走看看