[root@wx03 ~]# cat a14.pl use Net::SMTP; use LWP::UserAgent; use HTTP::Cookies; use HTTP::Headers; use HTTP::Response; use Encode; use JSON; use File::Temp qw/tempfile/; use HTTP::Date qw(time2iso str2time time2iso time2isoz); use Data::Dumper; my $CurrTime = time2iso(time()); my $dis_mainpublish='中均资本'; my $ua = LWP::UserAgent->new; $ua->timeout(10); $ua->env_proxy; my $now = time(); $ua->agent('Mozilla/5.0'); my $cookie_jar = HTTP::Cookies->new( file => 'lwp_cookies.txt', autosave => 1, ignore_discard => 1 ); $ua->cookie_jar($cookie_jar); my $response = $ua->get("http://120.55.118.6:3000/api/getcode?env=zj&phone=18072722237"); if ($response->is_success) { $r = $response->decoded_content; print " "; } else { die $response->status_line; }; #my $r=encode_utf8($r); my $hash = decode_json ( $r ); print $hash->[0]->[1]; print " "; [root@wx03 ~]# perl a14.pl Wide character in print at a14.pl line 38. 您的验证码为813231,本验证码30分钟内有效。