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. Eclipse搭建服务器

    一.首先,依次点击Window -->preferences-->Server-->Runtime environment -->add,再选择Apache,选择TOMcat的 ...

  2. PHP中的魔术方法总结

    1.__get.__set这两个方法是为在类和他们的父类中没有声明的属性而设计的__get( $property ) 当调用一个未定义的属性时访问此方法__set( $property, $value ...

  3. (一)初识Android

    第一节:手机操作系统简介 目前的主流智能操作系统有:Android , IOS , windows mobile ; Android 开源,属于谷歌公司,市场份额较大,前景广阔: IOS 属于苹果公司 ...

  4. iOS afnetworking最新版报错 没有AFHTTPRequestOperationManager类了

    今天开了一个小项目   用的是pod   然后  安装好 Afnetworking之后   发现 AFHTTPRequestOperationManager  这个类没有了  ,百度之后  发现 原来 ...

  5. 7-2 DBA顾问第一次上次操作考试

    SQLPLUS执行:     1--@?/rdbms/admin/awrrpt 生产snapshot, 一个时间点, 再执行下一个时间点.     2--   附件作业第一次执行步骤: 1) SQLP ...

  6. AngularJS2学习

    @Input @Input是用来定义模块的输入的,用来让父模块往子模块传递内容: @Component({ selector: 'bank-account', template: ` Bank Nam ...

  7. linux采用模块方法,添加一个新的设备

    该文转载自:http://rangercyh.blog.51cto.com/1444712/521244 系统调用是操作系统内核和应用程序之间的接口,而设备驱动程序是操作系统内核和机器硬件之间的接口. ...

  8. 《精通CSS-高级Web标准解决方案》阅读计划

    第一周     第1章 基础知识 1 第2章 为样式找到应用目标 1 第3章 可视化格式模型 1 第4章 背景图像效果 1       第二周     第5章 对链接应用样式 1 第6章 对列表应用样 ...

  9. SQL 添加字段和默认值脚本

    --插入字段和默认值alter table Acc_WayBill add DeclaredValue nvarchar(50)goEXEC sys.sp_addextendedproperty @n ...

  10. javascript 写策略模式,商场收银打折优惠策略

    [Decode error - output not utf-8] ----------------------------- 购物清单 方便面 : 100 x 50 = 5000 | 4000 菊花 ...