使用Perl,我从API调用中获得了一个基于key
-value
的字典。
use strict;
use warnings;
use LWP::Simple;
my $url = "http://example.com/?id=124341";
my $content = get($url);
$content =~ s/ /%20/g;
print $content;
{"id":"85710","name":"jack","friends":["james","sam","Michael","charlie"]}
字符串
我如何解析它以得到如下结果?
name : jack
hist friend list :
james
sam
Michael
charlie
型
3条答案
按热度按时间rmbxnbpk1#
字符串
tuwxkamq2#
字符串
lymnna713#
字符串