“get” not working in perl

旧城冷巷雨未停 提交于 2019-12-02 10:54:21

http://p3rl.org/LWP::Simple#get:

The get() function will fetch the document identified by the given URL and return it. It returns undef if it fails. […]

You will not be able to examine the response code or response headers (like 'Content-Type') when you are accessing the web using this function. If you need that information you should use the full OO interface (see LWP::UserAgent).

You really need better error reporting, switch to the LWP::UserAgent library. I suspect the forum software blocks the LWP user agent.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!