摘要: 原文网址:http://hi.baidu.com/0soul/blog/item/91098701f5051880e850cd4b.html原文:http://www.perl.com/pub/a/2002/08/20/perlandlwp.html版权信息有点多,其它的我写在最后。我觉得这个Perl的LWP文档挺不错的,所以就转过来,方便随时查阅,呵呵。下面是转载内容:************************************************************************************The Fuck Cutline************* 阅读全文
posted @ 2012-01-20 16:45 xiaodongrush 阅读(2515) 评论(1) 推荐(1) 编辑
摘要: 原文网址:http://hi.baidu.com/jackywdx/blog/item/35bb33daedb414dfb7fd4867.html一 LWP::Simple 功能1. 如何在Perl中使用该模块?use LWP::Simple;2. 如何获取一个页面内容?my $content = get(’http://www.yahoo.com.cn’);get函数把从www.yahoo.com.cn上获取得页面内容全部赋给$content这个变量,如果获取失败将返回一个undef的值。3. 如何获取头(Header)?my (b, d, $e) = header(’http://www. 阅读全文
posted @ 2012-01-20 16:43 xiaodongrush 阅读(783) 评论(1) 推荐(0) 编辑
摘要: 1. 题目2. 代码与输出1#-----------------------------------------------------------#2#Source:LearningPerl,chapter10,exercise-13#Date:2012-01-204#Author:xiaodongrush5#-----------------------------------------------------------#6use5.010;7$secret_num=int(1+rand100);8while(<STDIN>){9chomp;10if(/^[0-9]+$/) 阅读全文
posted @ 2012-01-20 12:37 xiaodongrush 阅读(354) 评论(0) 推荐(0) 编辑