zhumao

新手上路

  博客园 :: 首页 :: 博问 :: 闪存 :: 新随笔 :: 联系 :: 订阅 订阅 :: 管理 ::

2005年8月11日

摘要: 今天是中国的七夕,也俗称中国情人节。昨天我并不知道是七月初六。昨天上百度的时候看到一个什么传情,反正下雨打孩子--闲着也是闲着,就注册发了一条,想今天给老婆一个惊喜,可惜破百度没有给我发出来,他奶奶个腿!今天也没有跟老婆说,算了。晚上的时候再说吧。 阅读全文
posted @ 2005-08-11 14:47 zhumao-2 阅读(541) 评论(1) 推荐(0) 编辑

摘要: sub trim{ my $string = shift; $string =~ s/^\s+//; $string =~ s/\s+$//; return $string;} 阅读全文
posted @ 2005-08-11 13:59 zhumao-2 阅读(4323) 评论(0) 推荐(0) 编辑

2005年8月9日

摘要: 在 Perl 中使用内联 嵌入非 Perl 代码时不必再有使用 XS 的烦恼 Michael RobertsOwner, Vivtek2001 年 6 月 新的 Perl 内联模块允许您使用其他语言编写代码(如C、Python、Tcl 或 Java),并将其随意地放进 Perl 脚本中。不像以前将C 语言代码与 Perl进行连接的方法那样,内联的使用将非常简... 阅读全文
posted @ 2005-08-09 21:59 zhumao-2 阅读(594) 评论(0) 推荐(0) 编辑

摘要: perl中的特殊内置变量(转) 学习perl中的基础。 先来一个例子吧#!/usr/bin/perluse warnings;@array = qw(a b c d);foreach (@array) {print $_,"\n";}例子的作用就是定义一个数组并把其中的元素打印出来,这里需要注意的是foreach循环部分,foreach循环的标准格式应该是:foreach $elemen... 阅读全文
posted @ 2005-08-09 21:46 zhumao-2 阅读(439) 评论(0) 推荐(0) 编辑

摘要: 从网页中提取链接 以下是HTML::LinkExtor中的一个提取图片链接的例程#!/usr/bin/perl -wuse LWP::UserAgent;use HTML::LinkExtor;use URI::URL;$url = "http://www.163.com/"; # for instance$ua = LWP::UserAgent->new;# Set up a call... 阅读全文
posted @ 2005-08-09 21:44 zhumao-2 阅读(2443) 评论(0) 推荐(0) 编辑

摘要: #!/usr/bin/perl -w printf"write the path you want to search files:"; $searchdir=; chomp $searchdir; printf "Input search string:"; $searchstr=; chomp $searchstr; opendir(DIRHANDLE,$searchdir) || die "... 阅读全文
posted @ 2005-08-09 21:42 zhumao-2 阅读(1185) 评论(1) 推荐(0) 编辑

2005年8月3日

摘要: bzip2 and bunzip: Files With .bz2 Extensions by Brent FoxLast Modified: Wednesday, May 19, 2004 Introduction bzip2 and bunzip2 are file compression and decompression utiliti... 阅读全文
posted @ 2005-08-03 20:30 zhumao-2 阅读(1163) 评论(0) 推荐(0) 编辑

摘要: Windows 能干而 Linux 干不了的事情,那就是不需要干的事情发布于2005-07-25 被读694次 【字体:大 中 小】 作者:水木清华/sk8er 看的两个字“过瘾”,真的希望能从广大的程序员坐起,一点点抛弃windows,中国正在一点点的崛起,做为程序员,也不希望比那些运动员差吧?希望能为中国的软件业做点自己的贡献,每天努力中..... 作者:水木清华bbs上的sk... 阅读全文
posted @ 2005-08-03 20:27 zhumao-2 阅读(447) 评论(0) 推荐(0) 编辑

2005年7月27日

摘要: #!/usr/bin/perl -w ####################################################################### Example of how to use the Spreadsheet::WriteExcel module to create ## an Excel binary file. ... 阅读全文
posted @ 2005-07-27 09:50 zhumao-2 阅读(759) 评论(0) 推荐(0) 编辑

2005年7月26日

摘要: 安装服务器的时候没有注意,结果安装了很多没用的东西,关键在于有些软件包的版本太低,再安装其他软件的时候有问题,只好删除了。(root)eg.#rpm -qa|grep perl#rpm -e perl-CGI-2.81-88.4对于有相互依赖关系的软件包,加参数--nodeps参照这里http://www.rpm.org/max-rpm/ch-rpm-erase.html 阅读全文
posted @ 2005-07-26 21:40 zhumao-2 阅读(2895) 评论(0) 推荐(0) 编辑