开发者

Perl equivalent of PHP's get_file_contents()?

The following PHP code does exactly 开发者_运维百科what I want to do. The problem is I need to re-create it in Perl and I've been playing around with the open() and sysopen() Perl functions but can't do it. Does anyone have any help or know of any links that might help? Thanks.

$URL = "http://example.com/api.php?arguments=values";
echo file_get_contents($URL);


You can make use of LWP:

use LWP::Simple;
$contents = get $URL or die;
print $contents;
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜