centos6.5:/root/podinns/lib#cat t1.pl
use LWP::UserAgent;
use HTTP::Date qw(time2iso str2time time2iso time2isoz);
use Net::Ping;
use Socket;
use Net::SMTP;
use LWP;
use LWP::Simple;
use LWP::UserAgent;
use HTTP::Cookies;
use HTTP::Headers;
use HTTP::Response;
use Encode;
use URI::Escape;
use URI::URL;
my $ua = LWP::UserAgent->new;
$ua->timeout(5);
$ua->env_proxy;
$ua->agent("Mozilla/8.0");
my $cookie_jar = HTTP::Cookies->new(
file=>'lwp_cookies.txt',
autosave=>1,
ignore_discard=>1);
$ua->cookie_jar($cookie_jar); $var='https://licai.yingyinglicai.com/index.htm'; #$var='https://licai.yingyinglicai.com/user/loginByPwd.do';
my $response = $ua->get($var); if ($response->is_success) {
$var= $response->decoded_content;
print "\$var is $var\n";
}; centos6.5:/root/podinns/lib#cat t1.pl
use LWP::UserAgent;
use HTTP::Date qw(time2iso str2time time2iso time2isoz);
use Net::Ping;
use Socket;
use Net::SMTP;
use LWP;
use LWP::Simple;
use LWP::UserAgent;
use HTTP::Cookies;
use HTTP::Headers;
use HTTP::Response;
use Encode;
use URI::Escape;
use URI::URL;
my $ua = LWP::UserAgent->new;
$ua->timeout(5);
$ua->env_proxy;
$ua->agent("Mozilla/8.0");
my $cookie_jar = HTTP::Cookies->new(
file=>'lwp_cookies.txt',
autosave=>1,
ignore_discard=>1);
$ua->cookie_jar($cookie_jar); $var='https://licai.yingyinglicai.com/index.htm'; #$var='https://licai.yingyinglicai.com/user/loginByPwd.do';
my $response = $ua->get($var); if ($response->is_success) {
$var= $response->content;
print "\$var is $var\n";
};

随机推荐

  1. 关于.NET前后台提示框的那点事

    前言 关于提示框,或多或少都用到过,提示框常见方式两种:js原生alert() 和 div模拟弹层:下面以一个常见的需求业务场景来展现提示框的那点事: 正文内容 客户:需求方: 小白:实现方(全权负责 ...

  2. Java Mybatis 传参方式

    一.单个参数: public List<XXBean> getXXBeanList(String xxCode); <select id="getXXXBeanList&q ...

  3. Asp.Net alert弹出提示信息的5种方法

    1.ClientScript.RegisterStartupScript(GetType(),"message","<script>alert('第一种方式, ...

  4. (SQL Analyzer services)定义链接维度

    链接文档是在一个 Analysis Services 数据库中存在.但在相同版本和兼容级别的另一个 Analysis Services 数据库中重复使用的一种文档. 链接文档是只读的. 如果您想要修改 ...

  5. pat_1014

    1014. 福尔摩斯的约会 (20) 时间限制 50 ms 内存限制 32000 kB 代码长度限制 8000 B 判题程序 Standard 作者 CHEN, Yue 大侦探福尔摩斯接到一张奇怪的字 ...

  6. 数组做为参数传入Oracle存储过程操作数据库

    p { margin-bottom: 0.25cm; direction: ltr; color: rgb(0, 0, 0); line-height: 120%; text-align: justi ...

  7. jeesite 经常出现java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderL解决思路

    本来jeesite是用的maven,但是我开发的项目用这个框架没用maven, 经常报这个错,我能用的办法就是将springmvc—web.jar包删掉,然后重新添加

  8. Codevs 1904 最小路径覆盖问题

    1904 最小路径覆盖问题 时间限制: 2 s 空间限制: 256000 KB 题目等级 : 大师 Master 传送门 题目描述 Description 给定有向图G=(V,E).设P 是G 的一个 ...

  9. C++类的成员初始化列表的相关问题

    在以下四中情况下,要想让程序顺利编译,必须使用成员初始化列表(member initialization list): 1,初始化一个引用成员(reference member): 2,初始化一个常量 ...

  10. (转)Libevent(1)— 简介、编译、配置

    转自:http://name5566.com/4190.html 参考文献列表:http://www.wangafu.net/~nickm/libevent-book/ 此文编写的时候,使用到的 Li ...