小编Geo*_*ran的帖子

LWP :: Simple ::在浏览器中工作的URL失败

#!/usr/bin/perl

use strict;
use warnings;
use JSON qw( decode_json );
use LWP::Simple;

my $cavirtex = get('https://www.cavirtex.com/api2/orderbook.json?currencypair=BTCCAD');
print $cavirtex;
Run Code Online (Sandbox Code Playgroud)

编译时,我得到......

在cavirtex.pl第9行打印时使用未初始化的值$ cavirtex.

更多信息:https: //www.cavirtex.com/api_information#orderbook

谢谢.

编辑/更多信息:在我的程序中,当我替换...

https://www.cavirtex.com/api2/orderbook.json?currencypair=BTCCAD
Run Code Online (Sandbox Code Playgroud)

与...

https://www.bitstamp.net/api/ticker/
Run Code Online (Sandbox Code Playgroud)

它工作得很好.奇怪的.

perl json get

2
推荐指数
1
解决办法
684
查看次数

标签 统计

get ×1

json ×1

perl ×1