chriszg 发表于 2018-8-31 13:36:52

perl socket传hash--JSON

  EG:
  send:
  use JSON;
  my $json = JSON->new->ascii; #还有utf8与latin1
  my $str = $json->encode($res);
  print $socket $str
  ------------------
  接收端直接取

页: [1]
查看完整版本: perl socket传hash--JSON