上一页 1 ··· 4 5 6 7 8 9 10 11 12 下一页
摘要: 看到perl inter 进展缓慢,不过也不着急,看看这个模块的文档吧,虽然现在有很多OO的模块,我先看这个的。基础牢固了再去看那些复杂的,后面想看看anyevent,template tootkit ,dancer ,mojo, catalyst, PSGI/Pla... 阅读全文
posted @ 2012-12-11 16:40 程序员杰诺斯 阅读(223) 评论(0) 推荐(0) 编辑
摘要: 看到intermediate perl 14章,里面提到几个问题, 在网上的一些帖子(其他书)上看到一些和书上不对应的地方,于是自己测试了一下,inter perl上写的是正确的。梳理一下如下:Do all objects inherit from a common ... 阅读全文
posted @ 2012-12-10 15:43 程序员杰诺斯 阅读(165) 评论(0) 推荐(0) 编辑
摘要: 写在前面,our local 是声明包符号表的变量, my 的变量不在符号表中。这也产生了很多例子来说明他们说。1.查看符号表our $var;my $va;local $ss;foreach (keys %main::){ print $_, "\n";}2.... 阅读全文
posted @ 2012-12-03 22:15 程序员杰诺斯 阅读(153) 评论(0) 推荐(0) 编辑
摘要: http://perldoc.perl.org/perldata.html#Typeglobs-and-Filehandles1.typeglobs 和文件句柄上回说到,有符号表这么个东西, 一个符号b 映射一个 glob,里面可以有多个变量,相当一个1对多的hash... 阅读全文
posted @ 2012-12-03 21:51 程序员杰诺斯 阅读(235) 评论(0) 推荐(0) 编辑
摘要: 写在前面: perl中有引用,所以大部分情况不需要typeglob.以前看到了例子也不想多了解,今天看到群里有讨论到,就仔细阅读一下弄懂。 http://perldoc.perl.org/perldata.html#Typeglobs-and-Filehandlesh... 阅读全文
posted @ 2012-12-03 18:39 程序员杰诺斯 阅读(351) 评论(0) 推荐(0) 编辑
摘要: 转自 http://www.php-oa.com/2009/04/04/perl_getopt-long.html 写在前面,支持长参和短参,较为简单好用。 optionname 可以是字母,数字和 dash(-),不允许连续的dash,和dash结尾。更详细见:h... 阅读全文
posted @ 2012-11-29 17:45 程序员杰诺斯 阅读(144) 评论(0) 推荐(0) 编辑
摘要: Given two words word1 and word2, find the minimum number of steps required to convert word1 to word2. (each operation is counted as 1 ... 阅读全文
posted @ 2012-11-26 17:41 程序员杰诺斯 阅读(123) 评论(0) 推荐(0) 编辑
摘要: Divide two integers without using multiplication, division and mod operator.思路:先想到的是做减法,但是效率在两数差距大的时候复杂度很高, 之后想到移位的方式,把除数和余数提... 阅读全文
posted @ 2012-11-26 17:01 程序员杰诺斯 阅读(99) 评论(0) 推荐(0) 编辑
摘要: Given a string S and a string T, count the number of distinct subsequences of T in S.A subsequence of a string is a new string which i... 阅读全文
posted @ 2012-11-25 23:05 程序员杰诺斯 阅读(119) 评论(0) 推荐(0) 编辑
摘要: A message containing letters from A-Z is being encoded to numbers using the following mapping:'A' -> 1'B' -> 2...'Z' -> 26Given an enc... 阅读全文
posted @ 2012-11-15 11:41 程序员杰诺斯 阅读(107) 评论(0) 推荐(0) 编辑
上一页 1 ··· 4 5 6 7 8 9 10 11 12 下一页