2009年1月17日星期六

[PerlChina] Re: 小调查一把:看看现在在玩Perl的各位多大年龄?

80的


 
2009/1/18 zhihua zheng <zhihua.zheng@gmail.com>
80

2009/1/18 cnhack TNT <cnhacktnt@gmail.com>

我也85,看来85的还是蛮多的
大家有机会一起把各自的能力资源聚起来,看看能不能一起做点什么事情
一个人的力量太渺小啦:-)

2009/1/18 Falcon.C <falcom520@126.com>

哈哈  我85的
 
 
2009-01-18

Falcon.C

发件人: cui robin
发送时间: 2009-01-17  21:33:07
收件人: perlchina
抄送:
主题: [PerlChina] Re: 小调查一把:看看现在在玩Perl的各位多大年龄?
81

-~----------~----~----~----~------~----~------~--~---



--~--~---------~--~----~------------~-------~--~----~
您收到此信息是由于您订阅了 Google 论坛"PerlChina 论坛"论坛。
 要在此论坛发帖,请发电子邮件到 perlchina@googlegroups.com
 要退订此论坛,请发邮件至 perlchina+unsubscribe@googlegroups.com
 更多选项,请通过 http://groups.google.com/group/perlchina?hl=zh-CN 访问该论坛

-~----------~----~----~----~------~----~------~--~---

[PerlChina] Re: 小调查一把:看看现在在玩Perl的各位多大年龄?

80

2009/1/18 cnhack TNT <cnhacktnt@gmail.com>
我也85,看来85的还是蛮多的
大家有机会一起把各自的能力资源聚起来,看看能不能一起做点什么事情
一个人的力量太渺小啦:-)

2009/1/18 Falcon.C <falcom520@126.com>

哈哈  我85的
 
 
2009-01-18

Falcon.C

发件人: cui robin
发送时间: 2009-01-17  21:33:07
收件人: perlchina
抄送:
主题: [PerlChina] Re: 小调查一把:看看现在在玩Perl的各位多大年龄?
81

-~----------~----~----~----~------~----~------~--~---




--~--~---------~--~----~------------~-------~--~----~
您收到此信息是由于您订阅了 Google 论坛"PerlChina 论坛"论坛。
 要在此论坛发帖,请发电子邮件到 perlchina@googlegroups.com
 要退订此论坛,请发邮件至 perlchina+unsubscribe@googlegroups.com
 更多选项,请通过 http://groups.google.com/group/perlchina?hl=zh-CN 访问该论坛

-~----------~----~----~----~------~----~------~--~---

[PerlChina] Re: 如何根据一个指定文件来对一个目录下的文件进行替换?

open(FILE, ">$file"); 请改为 open(FILE, "+<$file");



2009/1/18 伟子 <zhengwei07@gmail.com>
有一个指定文件names.txt,共有50行,均为历届总统人名。如:
Bill Clinton
Goerge Bush
...

在另一个目录下,有1000个文件(从file0.txt到file999.txt),每个文件的内容可能会包含上述文件中的人名。我想把这1000个
文件中任意有上述人名的替换为"Barack Obama"(与时俱进,哈哈)。
下面是我的程序,但输出总是空文件。我是刚刚开始学perl,希望能够得到指点,谢谢!

#!/usr/bin/perl


# Open names.txt file
open(NAMES, "<names.txt");

# Get the handle of all files to be modified
opendir DIR, "newspaper";
@files = readdir DIR;
closedir DIR;

foreach $file (@files)
{
   open(FILE, ">$file");
   while(<NAMES>)
   {
       @F = split /\s+/;
       print FILE map { s/$F[0]\s$F[1]/John Smith/g; $_; };
       close FILE;
   }
   close FILE;
}

close NAMES;



--~--~---------~--~----~------------~-------~--~----~
您收到此信息是由于您订阅了 Google 论坛"PerlChina 论坛"论坛。
 要在此论坛发帖,请发电子邮件到 perlchina@googlegroups.com
 要退订此论坛,请发邮件至 perlchina+unsubscribe@googlegroups.com
 更多选项,请通过 http://groups.google.com/group/perlchina?hl=zh-CN 访问该论坛

-~----------~----~----~----~------~----~------~--~---

[PerlChina] Re: 小调查一把:看看现在在玩Perl的各位多大年龄?

我也85,看来85的还是蛮多的
大家有机会一起把各自的能力资源聚起来,看看能不能一起做点什么事情
一个人的力量太渺小啦:-)

2009/1/18 Falcon.C <falcom520@126.com>
哈哈  我85的
 
 
2009-01-18

Falcon.C

发件人: cui robin
发送时间: 2009-01-17  21:33:07
收件人: perlchina
抄送:
主题: [PerlChina] Re: 小调查一把:看看现在在玩Perl的各位多大年龄?
81

-~----------~----~----~----~------~----~------~--~---





--~--~---------~--~----~------------~-------~--~----~
您收到此信息是由于您订阅了 Google 论坛"PerlChina 论坛"论坛。
 要在此论坛发帖,请发电子邮件到 perlchina@googlegroups.com
 要退订此论坛,请发邮件至 perlchina+unsubscribe@googlegroups.com
 更多选项,请通过 http://groups.google.com/group/perlchina?hl=zh-CN 访问该论坛

-~----------~----~----~----~------~----~------~--~---

[PerlChina] Re: 小调查一把:看看现在在玩Perl的各位多大年龄?

哈哈  我85的
 
 
2009-01-18

Falcon.C

发件人: cui robin
发送时间: 2009-01-17  21:33:07
收件人: perlchina
抄送:
主题: [PerlChina] Re: 小调查一把:看看现在在玩Perl的各位多大年龄?
81

-~----------~----~----~----~------~----~------~--~---


--~--~---------~--~----~------------~-------~--~----~
您收到此信息是由于您订阅了 Google 论坛"PerlChina 论坛"论坛。
 要在此论坛发帖,请发电子邮件到 perlchina@googlegroups.com
 要退订此论坛,请发邮件至 perlchina+unsubscribe@googlegroups.com
 更多选项,请通过 http://groups.google.com/group/perlchina?hl=zh-CN 访问该论坛

-~----------~----~----~----~------~----~------~--~---

[PerlChina] Re: perl标量与列表和散列的一点疑问

perl5 的设计目标是连接各种程序和系统,implement the web。
perl6 的设计目标是重写各种系统,比如 ghostscript,gcc。

2009/1/17 allen <allenogz@gmail.com>
不管是 perl 还是 OO, 只要该思想,该技术能让我更加懒惰,我就会喜欢她,爱
上她!
OO也是从懒惰的精髓中产生的。
软件从懒惰这个基本点,一步一步地发展,让生活更加美好!
希望我新的一年,我能够更加懒惰。。
重要的是,养成自傲的霸气。。。。。路还很长


于 2009-1-16 19:09, Lee Duhem 写道:
> 2009/1/16 Changying Li<lchangying@gmail.com>:
>
>> yonghua<yonghua_peng@yahoo.com.cn>  writes:
>>
>>
>>> 相同的文件名、LIB名,perl只会load一次,见%INC的描述。
>>> do是强制load,它与require和use的区别请见:
>>>
>>> perldoc -q  'What's the difference between require and use?'
>>>
>> perldoc 也能这样用啊,很惭愧,现在才知道。
>>
>
> 这就是不看文档的结果 :-)
>
> lee
>
> >
>





--~--~---------~--~----~------------~-------~--~----~
您收到此信息是由于您订阅了 Google 论坛"PerlChina 论坛"论坛。
 要在此论坛发帖,请发电子邮件到 perlchina@googlegroups.com
 要退订此论坛,请发邮件至 perlchina+unsubscribe@googlegroups.com
 更多选项,请通过 http://groups.google.com/group/perlchina?hl=zh-CN 访问该论坛

-~----------~----~----~----~------~----~------~--~---

[PerlChina] Re: 小调查一把:看看现在在玩Perl的各位多大年龄?

我们都是80后,Yeah~~

在 2009-01-18日的 10:53 +0800,梁利文写道:
> 81年5月 都是奔3的
> 了>


--~--~---------~--~----~------------~-------~--~----~
您收到此信息是由于您订阅了 Google 论坛"PerlChina 论坛"论坛。
要在此论坛发帖,请发电子邮件到 perlchina@googlegroups.com
要退订此论坛,请发邮件至 perlchina+unsubscribe@googlegroups.com
更多选项,请通过 http://groups.google.com/group/perlchina?hl=zh-CN 访问该论坛
-~----------~----~----~----~------~----~------~--~---

[PerlChina] Re: 小调查一把:看看现在在玩Perl的各位多大年龄?

81年5月 都是奔3的了 --~--~---------~--~----~------------~-------~--~----~
您收到此信息是由于您订阅了 Google 论坛"PerlChina 论坛"论坛。
 要在此论坛发帖,请发电子邮件到 perlchina@googlegroups.com
 要退订此论坛,请发邮件至 perlchina+unsubscribe@googlegroups.com
 更多选项,请通过 http://groups.google.com/group/perlchina?hl=zh-CN 访问该论坛

-~----------~----~----~----~------~----~------~--~---

[PerlChina] 如何根据一个指定文件来对一个目录下的文件进行替换?

有一个指定文件names.txt,共有50行,均为历届总统人名。如:
Bill Clinton
Goerge Bush
...

在另一个目录下,有1000个文件(从file0.txt到file999.txt),每个文件的内容可能会包含上述文件中的人名。我想把这1000个
文件中任意有上述人名的替换为"Barack Obama"(与时俱进,哈哈)。
下面是我的程序,但输出总是空文件。我是刚刚开始学perl,希望能够得到指点,谢谢!

#!/usr/bin/perl


# Open names.txt file
open(NAMES, "<names.txt");

# Get the handle of all files to be modified
opendir DIR, "newspaper";
@files = readdir DIR;
closedir DIR;

foreach $file (@files)
{
open(FILE, ">$file");
while(<NAMES>)
{
@F = split /\s+/;
print FILE map { s/$F[0]\s$F[1]/John Smith/g; $_; };
close FILE;
}
close FILE;
}

close NAMES;
--~--~---------~--~----~------------~-------~--~----~
您收到此信息是由于您订阅了 Google 论坛"PerlChina 论坛"论坛。
要在此论坛发帖,请发电子邮件到 perlchina@googlegroups.com
要退订此论坛,请发邮件至 perlchina+unsubscribe@googlegroups.com
更多选项,请通过 http://groups.google.com/group/perlchina?hl=zh-CN 访问该论坛
-~----------~----~----~----~------~----~------~--~---

[PerlChina] Re: perl标量与列表和散列的一点疑问

不管是 perl 还是 OO, 只要该思想,该技术能让我更加懒惰,我就会喜欢她,爱
上她!
OO也是从懒惰的精髓中产生的。
软件从懒惰这个基本点,一步一步地发展,让生活更加美好!
希望我新的一年,我能够更加懒惰。。
重要的是,养成自傲的霸气。。。。。路还很长


于 2009-1-16 19:09, Lee Duhem 写道:
> 2009/1/16 Changying Li<lchangying@gmail.com>:
>
>> yonghua<yonghua_peng@yahoo.com.cn> writes:
>>
>>
>>> 相同的文件名、LIB名,perl只会load一次,见%INC的描述。
>>> do是强制load,它与require和use的区别请见:
>>>
>>> perldoc -q 'What's the difference between require and use?'
>>>
>> perldoc 也能这样用啊,很惭愧,现在才知道。
>>
>
> 这就是不看文档的结果 :-)
>
> lee
>
> >
>


--~--~---------~--~----~------------~-------~--~----~
您收到此信息是由于您订阅了 Google 论坛"PerlChina 论坛"论坛。
要在此论坛发帖,请发电子邮件到 perlchina@googlegroups.com
要退订此论坛,请发邮件至 perlchina+unsubscribe@googlegroups.com
更多选项,请通过 http://groups.google.com/group/perlchina?hl=zh-CN 访问该论坛
-~----------~----~----~----~------~----~------~--~---

[PerlChina] Re: 小调查一把:看看现在在玩Perl的各位多大年龄?

20多岁的 "牛"

于 2009-1-17 13:26, Hua Zhen 写道:
> 81
>
> 2009/1/17 Mike.G <hylinux@gmail.com <mailto:hylinux@gmail.com>>
>
> 小调查啊。纯粹是好玩,先说我。
> 79的。
>
> Mike.G
>
>
>
>
>
>
> --
> 凡事包容,凡事相信,凡事盼望,凡事忍耐。
>
> >


--~--~---------~--~----~------------~-------~--~----~
您收到此信息是由于您订阅了 Google 论坛"PerlChina 论坛"论坛。
要在此论坛发帖,请发电子邮件到 perlchina@googlegroups.com
要退订此论坛,请发邮件至 perlchina+unsubscribe@googlegroups.com
更多选项,请通过 http://groups.google.com/group/perlchina?hl=zh-CN 访问该论坛
-~----------~----~----~----~------~----~------~--~---

[PerlChina] Re: 小调查一把:看看现在在玩Perl的各位多大年龄?

81

-~----------~----~----~----~------~----~------~--~---



--~--~---------~--~----~------------~-------~--~----~
您收到此信息是由于您订阅了 Google 论坛"PerlChina 论坛"论坛。
 要在此论坛发帖,请发电子邮件到 perlchina@googlegroups.com
 要退订此论坛,请发邮件至 perlchina+unsubscribe@googlegroups.com
 更多选项,请通过 http://groups.google.com/group/perlchina?hl=zh-CN 访问该论坛

-~----------~----~----~----~------~----~------~--~---

[PerlChina] Re: 小调查一把:看看现在在玩Perl的各位多大年龄?

80

2009/1/17 大明 <addmyin@gmail.com>
87

2009/1/17 Zhen Li <yaleon.lee@gmail.com>:
> 85
>
> 2009/1/17 xufinal <xu_weiliang@msn.com>
>>
>> 87.....
>>
>
>
> >
>





--
姜源
Yuan Jiang
http://blog.vetcafe.net

--~--~---------~--~----~------------~-------~--~----~
您收到此信息是由于您订阅了 Google 论坛"PerlChina 论坛"论坛。
 要在此论坛发帖,请发电子邮件到 perlchina@googlegroups.com
 要退订此论坛,请发邮件至 perlchina+unsubscribe@googlegroups.com
 更多选项,请通过 http://groups.google.com/group/perlchina?hl=zh-CN 访问该论坛

-~----------~----~----~----~------~----~------~--~---

[PerlChina] Re: 小调查一把:看看现在在玩Perl的各位多大年龄?

87

2009/1/17 Zhen Li <yaleon.lee@gmail.com>:
> 85
>
> 2009/1/17 xufinal <xu_weiliang@msn.com>
>>
>> 87.....
>>
>
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
您收到此信息是由于您订阅了 Google 论坛"PerlChina 论坛"论坛。
要在此论坛发帖,请发电子邮件到 perlchina@googlegroups.com
要退订此论坛,请发邮件至 perlchina+unsubscribe@googlegroups.com
更多选项,请通过 http://groups.google.com/group/perlchina?hl=zh-CN 访问该论坛
-~----------~----~----~----~------~----~------~--~---

[PerlChina] Re: 小调查一把:看看现在在玩Perl的各位多大年龄?

85

2009/1/17 xufinal <xu_weiliang@msn.com>
87.....



--~--~---------~--~----~------------~-------~--~----~
您收到此信息是由于您订阅了 Google 论坛"PerlChina 论坛"论坛。
 要在此论坛发帖,请发电子邮件到 perlchina@googlegroups.com
 要退订此论坛,请发邮件至 perlchina+unsubscribe@googlegroups.com
 更多选项,请通过 http://groups.google.com/group/perlchina?hl=zh-CN 访问该论坛

-~----------~----~----~----~------~----~------~--~---

[PerlChina] Re: 小调查一把:看看现在在玩Perl的各位多大年龄?

87.....
--~--~---------~--~----~------------~-------~--~----~
您收到此信息是由于您订阅了 Google 论坛"PerlChina 论坛"论坛。
要在此论坛发帖,请发电子邮件到 perlchina@googlegroups.com
要退订此论坛,请发邮件至 perlchina+unsubscribe@googlegroups.com
更多选项,请通过 http://groups.google.com/group/perlchina?hl=zh-CN 访问该论坛
-~----------~----~----~----~------~----~------~--~---

[PerlChina] Re: 小调查一把:看看现在在玩Perl的各位多大年龄?

2009/1/17 Jacky Xu <x2x4com@gmail.com>
大家年龄段都差不多嘛,我81

大家几乎都比我大呀。。。84 的,哈哈

-agentzh


--~--~---------~--~----~------------~-------~--~----~
您收到此信息是由于您订阅了 Google 论坛"PerlChina 论坛"论坛。
 要在此论坛发帖,请发电子邮件到 perlchina@googlegroups.com
 要退订此论坛,请发邮件至 perlchina+unsubscribe@googlegroups.com
 更多选项,请通过 http://groups.google.com/group/perlchina?hl=zh-CN 访问该论坛

-~----------~----~----~----~------~----~------~--~---

[PerlChina] Re: 小调查一把:看看现在在玩Perl的各位多大年龄?

大家年龄段都差不多嘛,我81

在 2009-01-17六的 11:28 +0800,Mike.G写道:
> 小调查啊。纯粹是好玩,先说我。
> 79的。
>
> Mike.G
>
>
> >


--~--~---------~--~----~------------~-------~--~----~
您收到此信息是由于您订阅了 Google 论坛"PerlChina 论坛"论坛。
要在此论坛发帖,请发电子邮件到 perlchina@googlegroups.com
要退订此论坛,请发邮件至 perlchina+unsubscribe@googlegroups.com
更多选项,请通过 http://groups.google.com/group/perlchina?hl=zh-CN 访问该论坛
-~----------~----~----~----~------~----~------~--~---

[PerlChina] Re: 小调查一把:看看现在在玩Perl的各位多大年龄?

82 :-)

2009/1/17 Mike.G <hylinux@gmail.com>
小调查啊。纯粹是好玩,先说我。
79的。

Mike.G




--~--~---------~--~----~------------~-------~--~----~
您收到此信息是由于您订阅了 Google 论坛"PerlChina 论坛"论坛。
 要在此论坛发帖,请发电子邮件到 perlchina@googlegroups.com
 要退订此论坛,请发邮件至 perlchina+unsubscribe@googlegroups.com
 更多选项,请通过 http://groups.google.com/group/perlchina?hl=zh-CN 访问该论坛

-~----------~----~----~----~------~----~------~--~---

2009年1月16日星期五

[PerlChina] Re: 小调查一把:看看现在在玩Perl的各位多大年龄?

81


--~--~---------~--~----~------------~-------~--~----~
您收到此信息是由于您订阅了 Google 论坛"PerlChina 论坛"论坛。
 要在此论坛发帖,请发电子邮件到 perlchina@googlegroups.com
 要退订此论坛,请发邮件至 perlchina+unsubscribe@googlegroups.com
 更多选项,请通过 http://groups.google.com/group/perlchina?hl=zh-CN 访问该论坛

-~----------~----~----~----~------~----~------~--~---

[PerlChina] Re: 小调查一把:看看现在在玩Perl的各位多大年龄?

82

2009/1/17 kind terry <kindterry@gmail.com>


79




--~--~---------~--~----~------------~-------~--~----~
您收到此信息是由于您订阅了 Google 论坛"PerlChina 论坛"论坛。
 要在此论坛发帖,请发电子邮件到 perlchina@googlegroups.com
 要退订此论坛,请发邮件至 perlchina+unsubscribe@googlegroups.com
 更多选项,请通过 http://groups.google.com/group/perlchina?hl=zh-CN 访问该论坛

-~----------~----~----~----~------~----~------~--~---

[PerlChina] Re: 小调查一把:看看现在在玩Perl的各位多大年龄?



79
--~--~---------~--~----~------------~-------~--~----~
您收到此信息是由于您订阅了 Google 论坛"PerlChina 论坛"论坛。
 要在此论坛发帖,请发电子邮件到 perlchina@googlegroups.com
 要退订此论坛,请发邮件至 perlchina+unsubscribe@googlegroups.com
 更多选项,请通过 http://groups.google.com/group/perlchina?hl=zh-CN 访问该论坛

-~----------~----~----~----~------~----~------~--~---

[PerlChina] Re: 小调查一把:看看现在在玩Perl的各位多大年龄?

78:)

2009/1/17 Hua Zhen <acmilan.baresi@gmail.com>
81

2009/1/17 Mike.G <hylinux@gmail.com>
小调查啊。纯粹是好玩,先说我。
79的。

Mike.G




--
杀人放火金腰带,补路修桥无尸骸。

……

劉鑫
March.Liu

--~--~---------~--~----~------------~-------~--~----~
您收到此信息是由于您订阅了 Google 论坛"PerlChina 论坛"论坛。
 要在此论坛发帖,请发电子邮件到 perlchina@googlegroups.com
 要退订此论坛,请发邮件至 perlchina+unsubscribe@googlegroups.com
 更多选项,请通过 http://groups.google.com/group/perlchina?hl=zh-CN 访问该论坛

-~----------~----~----~----~------~----~------~--~---

[PerlChina] Re: 小调查一把:看看现在在玩Perl的各位多大年龄?

81

2009/1/17 Mike.G <hylinux@gmail.com>
小调查啊。纯粹是好玩,先说我。
79的。

Mike.G






--
凡事包容,凡事相信,凡事盼望,凡事忍耐。

--~--~---------~--~----~------------~-------~--~----~
您收到此信息是由于您订阅了 Google 论坛"PerlChina 论坛"论坛。
 要在此论坛发帖,请发电子邮件到 perlchina@googlegroups.com
 要退订此论坛,请发邮件至 perlchina+unsubscribe@googlegroups.com
 更多选项,请通过 http://groups.google.com/group/perlchina?hl=zh-CN 访问该论坛

-~----------~----~----~----~------~----~------~--~---

[PerlChina] Re: 小调查一把:看看现在在玩Perl的各位多大年龄?

85

2009/1/17 Mike.G <hylinux@gmail.com>
小调查啊。纯粹是好玩,先说我。
79的。

Mike.G




--~--~---------~--~----~------------~-------~--~----~
您收到此信息是由于您订阅了 Google 论坛"PerlChina 论坛"论坛。
 要在此论坛发帖,请发电子邮件到 perlchina@googlegroups.com
 要退订此论坛,请发邮件至 perlchina+unsubscribe@googlegroups.com
 更多选项,请通过 http://groups.google.com/group/perlchina?hl=zh-CN 访问该论坛

-~----------~----~----~----~------~----~------~--~---

[PerlChina] Re: perl标量与列表和散列的一点疑问

2009/1/16 Lee Duhem <lee.duhem@gmail.com>
2009/1/16 agentzh <agentzh@gmail.com>:
> 2009/1/16 e280s 4ever <e280s4ever@gmail.com>
>>
>> 那如果cnhack说的正确的话,你说的应该不对吧(我没用过perl6)。
>> @list[0]可以理解,合法,
>> 但%hash{'aaa'}肯定不应该合法!
>
> Larry 的想法是在 Perl 6 中,让变量的 sigil 永远和它自身的类型保持一致,而不管这个变量是怎么用的(比如下标访问啥的),目的是
>
> 1. 更一致,grep 友好
> 2. 太多的初学者会对 sigil 的不一致使用产生疑问,为了教学方便,也省一个 FAQ
>
> 在 Perl 5 中 @a[...] 主要用于数组切片,比如:
>
> $ perl -e '@a=qw(x y);print @a[0..1]'
> xy
>
> 只不过在标量上下文中返回切片中的最后一个元素,而非切片的长度:

因为 slice 返回的是一个 list 而不是 array,而在 scalar context 中,list 返回它的最后一个元素,
array 则返回其长度。

嗯嗯,多谢提醒:

$ perl -e 'print scalar (1,2,3)'
3

在 Perl 6 中 list 和 array 就不再这么 subtle 了,呵呵。。。

Thanks!
-agentzh


--~--~---------~--~----~------------~-------~--~----~
您收到此信息是由于您订阅了 Google 论坛"PerlChina 论坛"论坛。
 要在此论坛发帖,请发电子邮件到 perlchina@googlegroups.com
 要退订此论坛,请发邮件至 perlchina+unsubscribe@googlegroups.com
 更多选项,请通过 http://groups.google.com/group/perlchina?hl=zh-CN 访问该论坛

-~----------~----~----~----~------~----~------~--~---

[PerlChina] 小调查一把:看看现在在玩Perl的各位多大年龄?

小调查啊。纯粹是好玩,先说我。
79的。

Mike.G


--~--~---------~--~----~------------~-------~--~----~
您收到此信息是由于您订阅了 Google 论坛"PerlChina 论坛"论坛。
 要在此论坛发帖,请发电子邮件到 perlchina@googlegroups.com
 要退订此论坛,请发邮件至 perlchina+unsubscribe@googlegroups.com
 更多选项,请通过 http://groups.google.com/group/perlchina?hl=zh-CN 访问该论坛

-~----------~----~----~----~------~----~------~--~---

[PerlChina] Re: 请教一个简单的CGI::Application::Dispatch问题


我喜欢插件: CGI::Application::Plugin::ActionDispatch
写多个cgi,


;)

Mike.G


--~--~---------~--~----~------------~-------~--~----~
您收到此信息是由于您订阅了 Google 论坛"PerlChina 论坛"论坛。
 要在此论坛发帖,请发电子邮件到 perlchina@googlegroups.com
 要退订此论坛,请发邮件至 perlchina+unsubscribe@googlegroups.com
 更多选项,请通过 http://groups.google.com/group/perlchina?hl=zh-CN 访问该论坛

-~----------~----~----~----~------~----~------~--~---

[PerlChina] Re: 有没有在上海的Perl爱好者?

我在南京 很希望跟大家交流

On 1/6/09, y6cmE <refile@gmail.com> wrote:
> 呵呵,偶在厦门,没参加过任何Perler聚会,真是伤感。
>
> 在09-1-6,Jedy <jedywu@gmail.com> 写道:
>>
>> 我们公司用perl的,perler很多,不过fun有多少没调查。
>>
>> 2009/1/6 purl lamp <lamp.purl@gmail.com>
>>
>>> 请自行筹措组织聚会,我可以参与,因为我正在移民北京 :D
>>>
>>> 2009/1/6 kind terry <kindterry@gmail.com>
>>>
>>>
>>>> 呃,那怎么加入呢?
>>>>
>>>>
>>>> 2009/1/6 Beckheng Lam <bi.ken.lam@gmail.com>
>>>>
>>>> 上海的perler都有组织活动的,其中不乏PERL界高手。
>>>>>
>>>>> smallfish wrote:
>>>>>
>>>>> 偶不是。。。偶在南京。[image: 大笑 图释]
>>>>> 北京和广州地方应该满多Perler的
>>>>> --
>>>>> blog : http://hi.baidu.com/smallfish7788
>>>>> bbs : http://bbs.chinaunix.net/forum-55-1.html
>>>>> smallfish / xiaoyu9805119
>>>>>
>>>>>
>>>>> *From:* kind terry <kindterry@gmail.com>
>>>>> *Sent:* Tuesday, January 06, 2009 4:30 PM
>>>>> *To:* perlchina@googlegroups.com
>>>>> *Subject:* [PerlChina] 有没有在上海的Perl爱好者?
>>>>>
>>>>>
>>>>> 有没有在上海的Perl爱好者?
>>>>> 报个道吧,咱们想办法也组织一些什么交流交流,好向首都的同志看齐。
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Perl乐事 -- http://www.perlersh.org
>>>>>
>>>>>
>>>>
>>>>
>>>>
>>>>
>>>
>>>
>>>
>>>
>>>
>>
>>
>> >
>>
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
您收到此信息是由于您订阅了 Google 论坛"PerlChina 论坛"论坛。
要在此论坛发帖,请发电子邮件到 perlchina@googlegroups.com
要退订此论坛,请发邮件至 perlchina+unsubscribe@googlegroups.com
更多选项,请通过 http://groups.google.com/group/perlchina?hl=zh-CN 访问该论坛
-~----------~----~----~----~------~----~------~--~---

[PerlChina] Re: 写pl大家都用啥工具?

个人觉得的eclipse那perl插件还蛮好的

On 1/9/09, Tian Yazhou <phio.asia@gmail.com> wrote:
> 我用Vim加Perl-support <http://www.vim.org/scripts/script.php?script_id=556>
> 插件,配上perltidy和Perl::Critic,还是不错的,一个命令就可以添加文件头、函数头、块式注释等等,还可以美化代码格式,对代码进行Profile等等。我最喜欢的就是可以一键美化代码,添加各种代码元素这两个功能。
> Perl-support可以参考这个
> http://www.thegeekstuff.com/2009/01/make-vim-as-your-perl-ide-using-perl-supportvim-plugin/
> perltidy就是Perl Best Practice里推荐的那个,在Linux各个发行版应该都有的
>
> 2009/1/9 smallfish <smallfish@live.cn>
>
>> 据说世界上有三种人,一种用Vi(VIM就是VI的高级版Vi IMproved),另一种用Emacs,剩下的是第三种人
>> --
>> blog : http://hi.baidu.com/smallfish7788
>> bbs : http://bbs.chinaunix.net/forum-55-1.html
>> smallfish / xiaoyu9805119
>>
>> *From:* 刘鑫
>> *Sent:* Friday, January 09, 2009 3:54 PM
>> *To:* perlchina@googlegroups.com
>> *Subject:* [PerlChina] Re: 写pl大家都用啥工具?
>>
>> EMACS党爬过。
>>
>> 2009/1/9 smallfish <smallfish@live.cn>
>>
>>> 据说阅读源码不错
>>> --
>>> blog : http://hi.baidu.com/smallfish7788
>>> bbs : http://bbs.chinaunix.net/forum-55-1.html
>>> smallfish / xiaoyu9805119
>>>
>>> *From:* Beckheng Lam <bi.ken.lam@gmail.com>
>>> *Sent:* Friday, January 09, 2009 3:52 PM
>>> *To:* perlchina@googlegroups.com
>>> *Subject:* [PerlChina] Re: 写pl大家都用啥工具?
>>>
>>> Sorry,名字更正一下:Source Insight
>>> :-P
>>>
>>> ximiff wrote:
>>>
>>> ues 破解版。。
>>> Komodo速度不能忍在 1G下
>>>
>>>
>>> 2009-01-09
>>> ------------------------------
>>> ximiff
>>> ------------------------------
>>> *发件人:* smallfish
>>> *发送时间:* 2009-01-09 15:26:17
>>> *收件人:* perlchina@googlegroups.com
>>> *抄送:*
>>> *主题:* [PerlChina] 写pl大家都用啥工具?
>>> 以前一直用VIM,最近装了个小的一米的SciTE,还有Komodo IDE。
>>> --
>>> blog : http://hi.baidu.com/smallfish7788
>>> bbs : http://bbs.chinaunix.net/forum-55-1.html
>>> smallfish / xiaoyu9805119
>>>
>>>
>>>
>>>
>>> --
>>> Perl乐事 -- http://www.perlersh.org
>>>
>>>
>>>
>>
>>
>> --
>> 杀人放火金腰带,补路修桥无尸骸。
>>
>> ……
>>
>> 劉鑫
>> March.Liu
>> >
>>
>
>
> --
> You should be the change you wish to see in the world
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
您收到此信息是由于您订阅了 Google 论坛"PerlChina 论坛"论坛。
要在此论坛发帖,请发电子邮件到 perlchina@googlegroups.com
要退订此论坛,请发邮件至 perlchina+unsubscribe@googlegroups.com
更多选项,请通过 http://groups.google.com/group/perlchina?hl=zh-CN 访问该论坛
-~----------~----~----~----~------~----~------~--~---

[PerlChina] Re: Sexy Slogan Sun Earth Symbol Art Aqualights Aquamotion T-shirts & Shirts

发广告我拷。

2009/1/16 haner <karnjohri@gmail.com>:
>
> Sexy Slogan Sun Earth Symbol Art Aqualights Aquamotion T-shirts &
> Shirts
> Teens and parents fighting over what is appropriate is nothing new.
> But now, girl-centric groups are working to arm girls with the
> awareness and self-confidence to say no to the sexy.
> Victoria's Secret CEO Sharen Turney recently said her company has
> gotten too sexy. Declining profits prompted her to examine the
> company's Pink line (marketed to younger women and girls) and call for
> a return to a more sophisticated brand.
> After Miley Cyrus, 15, walked the red carpet at the Academy Awards in
> an age-appropriate (but still glam) Valentino gown, she won praise
> from Kimora Lee Simmons, Baby Phat clothing designer and mother of two
> girls
> http://wm.scoreslivecash.com/hit.php?s=1&p=3&w=100088&t=0&c=
> http://wm.scoreslivecash.com/hit.php?s=1&p=3&w=100088&t=0&c=
> >
>

--~--~---------~--~----~------------~-------~--~----~
您收到此信息是由于您订阅了 Google 论坛"PerlChina 论坛"论坛。
要在此论坛发帖,请发电子邮件到 perlchina@googlegroups.com
要退订此论坛,请发邮件至 perlchina+unsubscribe@googlegroups.com
更多选项,请通过 http://groups.google.com/group/perlchina?hl=zh-CN 访问该论坛
-~----------~----~----~----~------~----~------~--~---

[PerlChina] Sexy Slogan Sun Earth Symbol Art Aqualights Aquamotion T-shirts & Shirts

Sexy Slogan Sun Earth Symbol Art Aqualights Aquamotion T-shirts &
Shirts
Teens and parents fighting over what is appropriate is nothing new.
But now, girl-centric groups are working to arm girls with the
awareness and self-confidence to say no to the sexy.
Victoria's Secret CEO Sharen Turney recently said her company has
gotten too sexy. Declining profits prompted her to examine the
company's Pink line (marketed to younger women and girls) and call for
a return to a more sophisticated brand.
After Miley Cyrus, 15, walked the red carpet at the Academy Awards in
an age-appropriate (but still glam) Valentino gown, she won praise
from Kimora Lee Simmons, Baby Phat clothing designer and mother of two
girls
http://wm.scoreslivecash.com/hit.php?s=1&p=3&w=100088&t=0&c=
http://wm.scoreslivecash.com/hit.php?s=1&p=3&w=100088&t=0&c=
--~--~---------~--~----~------------~-------~--~----~
您收到此信息是由于您订阅了 Google 论坛"PerlChina 论坛"论坛。
要在此论坛发帖,请发电子邮件到 perlchina@googlegroups.com
要退订此论坛,请发邮件至 perlchina+unsubscribe@googlegroups.com
更多选项,请通过 http://groups.google.com/group/perlchina?hl=zh-CN 访问该论坛
-~----------~----~----~----~------~----~------~--~---

[PerlChina] Re: perl标量与列表和散列的一点疑问

2009/1/16 Changying Li <lchangying@gmail.com>:
> yonghua <yonghua_peng@yahoo.com.cn> writes:
>
>> 相同的文件名、LIB名,perl只会load一次,见%INC的描述。
>> do是强制load,它与require和use的区别请见:
>>
>> perldoc -q 'What's the difference between require and use?'
> perldoc 也能这样用啊,很惭愧,现在才知道。

这就是不看文档的结果 :-)

lee

--~--~---------~--~----~------------~-------~--~----~
您收到此信息是由于您订阅了 Google 论坛"PerlChina 论坛"论坛。
要在此论坛发帖,请发电子邮件到 perlchina@googlegroups.com
要退订此论坛,请发邮件至 perlchina+unsubscribe@googlegroups.com
更多选项,请通过 http://groups.google.com/group/perlchina?hl=zh-CN 访问该论坛
-~----------~----~----~----~------~----~------~--~---

[PerlChina] Re: perl标量与列表和散列的一点疑问

2009/1/16 agentzh <agentzh@gmail.com>:
> 2009/1/16 e280s 4ever <e280s4ever@gmail.com>
>>
>> 那如果cnhack说的正确的话,你说的应该不对吧(我没用过perl6)。
>> @list[0]可以理解,合法,
>> 但%hash{'aaa'}肯定不应该合法!
>
> Larry 的想法是在 Perl 6 中,让变量的 sigil 永远和它自身的类型保持一致,而不管这个变量是怎么用的(比如下标访问啥的),目的是
>
> 1. 更一致,grep 友好
> 2. 太多的初学者会对 sigil 的不一致使用产生疑问,为了教学方便,也省一个 FAQ
>
> 在 Perl 5 中 @a[...] 主要用于数组切片,比如:
>
> $ perl -e '@a=qw(x y);print @a[0..1]'
> xy
>
> 只不过在标量上下文中返回切片中的最后一个元素,而非切片的长度:

因为 slice 返回的是一个 list 而不是 array,而在 scalar context 中,list 返回它的最后一个元素,
array 则返回其长度。

lee

--~--~---------~--~----~------------~-------~--~----~
您收到此信息是由于您订阅了 Google 论坛"PerlChina 论坛"论坛。
要在此论坛发帖,请发电子邮件到 perlchina@googlegroups.com
要退订此论坛,请发邮件至 perlchina+unsubscribe@googlegroups.com
更多选项,请通过 http://groups.google.com/group/perlchina?hl=zh-CN 访问该论坛
-~----------~----~----~----~------~----~------~--~---

[PerlChina] Re: perl标量与列表和散列的一点疑问

perldoc -q 'what do you want to eat tonight?'
鱼翅 and 燕窝!!

"Jester" <jester@perlchina.org> writes:

> -q perlfaq-search-regexp
> The -q option takes a regular expression as an
> argument. It will search the question headings in
> perlfaq[1-9] and print the entries matching the regular
> expression. Example: "perldoc -q shuffle"
>
> 所以,其实真正遇到问题时的用法是给关键词,比如:perldoc -q require use difference
> 这样就能得到答案了(如果有的话)。
>
> Jester
>
> ----- Original Message -----
> From: "Changying Li" <lchangying@gmail.com>
> To: <perlchina@googlegroups.com>
> Sent: Friday, January 16, 2009 5:05 PM
> Subject: [PerlChina] Re: perl标量与列表和散列的一点疑问
>
>
>> yonghua <yonghua_peng@yahoo.com.cn> writes:
>>
>> > 相同的文件名、LIB名,perl只会load一次,见%INC的描述。
>> > do是强制load,它与require和use的区别请见:
>> >
>> > perldoc -q 'What's the difference between require and use?'
>> perldoc 也能这样用啊,很惭愧,现在才知道。
>
> >

--

Thanks & Regards

Changying Li

--~--~---------~--~----~------------~-------~--~----~
您收到此信息是由于您订阅了 Google 论坛"PerlChina 论坛"论坛。
要在此论坛发帖,请发电子邮件到 perlchina@googlegroups.com
要退订此论坛,请发邮件至 perlchina+unsubscribe@googlegroups.com
更多选项,请通过 http://groups.google.com/group/perlchina?hl=zh-CN 访问该论坛
-~----------~----~----~----~------~----~------~--~---

[PerlChina] Re: perl标量与列表和散列的一点疑问

2009/1/16 e280s 4ever <e280s4ever@gmail.com>
那如果cnhack说的正确的话,你说的应该不对吧(我没用过perl6)。
@list[0]可以理解,合法,
但%hash{'aaa'}肯定不应该合法!

Larry 的想法是在 Perl 6 中,让变量的 sigil 永远和它自身的类型保持一致,而不管这个变量是怎么用的(比如下标访问啥的),目的是

1. 更一致,grep 友好
2. 太多的初学者会对 sigil 的不一致使用产生疑问,为了教学方便,也省一个 FAQ

在 Perl 5 中 @a[...] 主要用于数组切片,比如:

$ perl -e '@a=qw(x y);print @a[0..1]'
xy

只不过在标量上下文中返回切片中的最后一个元素,而非切片的长度:

$perl -e '@a=qw(x y);print scalar @a[0..1]'
y

这个行为我倒不太清楚设计动机,呵呵

Cheers,
-agentzh

--~--~---------~--~----~------------~-------~--~----~
您收到此信息是由于您订阅了 Google 论坛"PerlChina 论坛"论坛。
 要在此论坛发帖,请发电子邮件到 perlchina@googlegroups.com
 要退订此论坛,请发邮件至 perlchina+unsubscribe@googlegroups.com
 更多选项,请通过 http://groups.google.com/group/perlchina?hl=zh-CN 访问该论坛

-~----------~----~----~----~------~----~------~--~---

[PerlChina] perl标量与列表和散列的一点疑问

-q perlfaq-search-regexp
The -q option takes a regular expression as an
argument. It will search the question headings in
perlfaq[1-9] and print the entries matching the regular
expression. Example: "perldoc -q shuffle"

所以,其实真正遇到问题时的用法是给关键词,比如:perldoc -q require use difference
这样就能得到答案了(如果有的话)。

Jester

----- Original Message -----
From: "Changying Li" <lchangying@gmail.com>
To: <perlchina@googlegroups.com>
Sent: Friday, January 16, 2009 5:05 PM
Subject: [PerlChina] Re: perl标量与列表和散列的一点疑问


> yonghua <yonghua_peng@yahoo.com.cn> writes:
>
> > 相同的文件名、LIB名,perl只会load一次,见%INC的描述。
> > do是强制load,它与require和use的区别请见:
> >
> > perldoc -q 'What's the difference between require and use?'
> perldoc 也能这样用啊,很惭愧,现在才知道。

--~--~---------~--~----~------------~-------~--~----~
您收到此信息是由于您订阅了 Google 论坛"PerlChina 论坛"论坛。
要在此论坛发帖,请发电子邮件到 perlchina@googlegroups.com
要退订此论坛,请发邮件至 perlchina+unsubscribe@googlegroups.com
更多选项,请通过 http://groups.google.com/group/perlchina?hl=zh-CN 访问该论坛
-~----------~----~----~----~------~----~------~--~---

[PerlChina] Re: perl标量与列表和散列的一点疑问

yonghua <yonghua_peng@yahoo.com.cn> writes:

> 相同的文件名、LIB名,perl只会load一次,见%INC的描述。
> do是强制load,它与require和use的区别请见:
>
> perldoc -q 'What's the difference between require and use?'
perldoc 也能这样用啊,很惭愧,现在才知道。
>
> --
> yonghua peng
> http://home.arcor.de/pangj/
>
>
> --- On Fri, 1/16/09, Xiaojun Deng <xjdengz@gmail.com> wrote:
>
>> From: Xiaojun Deng <xjdengz@gmail.com>
>> Subject: [PerlChina] Re: perl标量与列表和散列的一点疑问
>> To: perlchina@googlegroups.com
>> Date: Friday, January 16, 2009, 12:36 PM
>> 如果两个文件有相同名字的变量,require或者import后会不会覆盖掉呢,怎么用
>> 名字空间来区别的阿? 还有这些和do
>> "some_perl_file"有何区别呢?
>>
>> On Fri, 2009-01-16 at 11:10 +0800, smallfish wrote:
>> > 学习了。
>> >
>> 一直都是按照第一和第二个方法采用our共享变量的。
>> >
>> > --
>> > blog : http://hi.baidu.com/smallfish7788
>> > bbs : http://bbs.chinaunix.net/forum-55-1.html
>> > smallfish(xiaoyu9805119)
>> >
>> > --------------------------------------------------
>> > From: "yonghua"
>> <yonghua_peng@yahoo.com.cn>
>> > Sent: Friday, January 16, 2009 11:03 AM
>> > To: <perlchina@googlegroups.com>
>> > Subject: [PerlChina] Re:
>> perl标量与列表和散列的一点疑问
>> >
>> > >
>> > >
>> > > --- On Fri, 1/16/09, Ben_Chan@WISTRON.COM
>> <Ben_Chan@WISTRON.COM> wrote:
>> > >
>> > >> From: Ben_Chan@WISTRON.COM
>> <Ben_Chan@WISTRON.COM>
>> > >> Subject: [PerlChina] Re:
>> perl标量与列表和散列的一点疑问
>> > >> To: perlchina@googlegroups.com
>> > >> Date: Friday, January 16, 2009, 10:50 AM
>> > >> "There's more than one way to do it"
>> > >> 简单易用就好吧,面向对象之类的
>> > >>
>> 都是一个想法而已,C也可以写成面向对象的风格啊
>> > >
>> > >
>> > >
>> 不是想法不想法的问题,而是某些情形下,OO可以节省内存、提高性能。
>> > >
>> 跟老外合作过不少MP项目,这方面深有体会。
>> > > 写过一篇FAQ release在mailing
>> lists上,看看或许有所参考:
>> > >
>> > >
>> http://home.arcor.de/pangj/share_variables_between_perl_scripts.txt
>> > >
>> > >
>> > > Jeff.
>> > >
>> > > >
>> > >
>> >
>> > >
>>
>>
>>
>
>
--

Thanks & Regards

Changying Li

--~--~---------~--~----~------------~-------~--~----~
您收到此信息是由于您订阅了 Google 论坛"PerlChina 论坛"论坛。
要在此论坛发帖,请发电子邮件到 perlchina@googlegroups.com
要退订此论坛,请发邮件至 perlchina+unsubscribe@googlegroups.com
更多选项,请通过 http://groups.google.com/group/perlchina?hl=zh-CN 访问该论坛
-~----------~----~----~----~------~----~------~--~---

[PerlChina] Re: perl标量与列表和散列的一点疑问

呵呵,但是似乎是自相矛盾了。

2009/1/16 cnhack TNT <cnhacktnt@gmail.com>
唉,没有什么特定合法不合法的,存在既有它的道理,设计师肯定会有他的原因
一种东西可以多种表示方法而已

2009/1/16 e280s 4ever <e280s4ever@gmail.com>
那如果cnhack说的正确的话,你说的应该不对吧(我没用过perl6)。
@list[0]可以理解,合法,
但%hash{'aaa'}肯定不应该合法!

2009/1/16 wbi 畢 <wbisearchina@hotmail.co.jp>
perl6 下 就改成

 
@list[0]    %hash{'aaa'}  合法  -- 个人觉得这样更合理些

$list[0]    $hash{'aaa'}   不合法



Date: Fri, 16 Jan 2009 09:03:03 +0800
From: bi.ken.lam@gmail.com
To: perlchina@googlegroups.com
Subject: [PerlChina] Re: perl标量与列表和散列的一点疑问


不是大家说的,是我说的:larry说要这样做的。^_^!

e280s wrote:
首先声明:这只是我的一点认识,不是来招口水的,也不涉及到perl的优劣。  1. 我建立一个列表: @list = qw/aaa bbb ccc ddd/;  我想使用@list中的aaa,于是我可以使用: @list[0]或$list[0]  2. 我建立一个散列: %hash = (     'aaa' => 'aaaa',     'bbb' => 'bbbb',     'ccc' => 'cccc' ); 我想使用aaaa,于是: $hash{'aaa'}即可。但是%hash{'aaa'}就是一个错误的用法。  疑问:是不是设计的时候设计使用@list[下标]的方式是多余的啊,而对散列没有这样一个类似的用法。  我估计大家又该说了:larry说要这样做的。^_^!  呵呵。     


--  Perl乐事 -- http://www.perlersh.org 


--~--~---------~--~----~------------~-------~--~----~
您收到此信息是由于您订阅了 Google 论坛"PerlChina 论坛"论坛。
 要在此论坛发帖,请发电子邮件到 perlchina@googlegroups.com
 要退订此论坛,请发邮件至 perlchina+unsubscribe@googlegroups.com
 更多选项,请通过 http://groups.google.com/group/perlchina?hl=zh-CN 访问该论坛

-~----------~----~----~----~------~----~------~--~---

[PerlChina] Re: perl标量与列表和散列的一点疑问

唉,没有什么特定合法不合法的,存在既有它的道理,设计师肯定会有他的原因
一种东西可以多种表示方法而已

2009/1/16 e280s 4ever <e280s4ever@gmail.com>
那如果cnhack说的正确的话,你说的应该不对吧(我没用过perl6)。
@list[0]可以理解,合法,
但%hash{'aaa'}肯定不应该合法!

2009/1/16 wbi 畢 <wbisearchina@hotmail.co.jp>
perl6 下 就改成

 
@list[0]    %hash{'aaa'}  合法  -- 个人觉得这样更合理些

$list[0]    $hash{'aaa'}   不合法



Date: Fri, 16 Jan 2009 09:03:03 +0800
From: bi.ken.lam@gmail.com
To: perlchina@googlegroups.com
Subject: [PerlChina] Re: perl标量与列表和散列的一点疑问


不是大家说的,是我说的:larry说要这样做的。^_^!

e280s wrote:
首先声明:这只是我的一点认识,不是来招口水的,也不涉及到perl的优劣。  1. 我建立一个列表: @list = qw/aaa bbb ccc ddd/;  我想使用@list中的aaa,于是我可以使用: @list[0]或$list[0]  2. 我建立一个散列: %hash = (     'aaa' => 'aaaa',     'bbb' => 'bbbb',     'ccc' => 'cccc' ); 我想使用aaaa,于是: $hash{'aaa'}即可。但是%hash{'aaa'}就是一个错误的用法。  疑问:是不是设计的时候设计使用@list[下标]的方式是多余的啊,而对散列没有这样一个类似的用法。  我估计大家又该说了:larry说要这样做的。^_^!  呵呵。     


--  Perl乐事 -- http://www.perlersh.org 



--~--~---------~--~----~------------~-------~--~----~
您收到此信息是由于您订阅了 Google 论坛"PerlChina 论坛"论坛。
 要在此论坛发帖,请发电子邮件到 perlchina@googlegroups.com
 要退订此论坛,请发邮件至 perlchina+unsubscribe@googlegroups.com
 更多选项,请通过 http://groups.google.com/group/perlchina?hl=zh-CN 访问该论坛

-~----------~----~----~----~------~----~------~--~---

[PerlChina] Re: perl标量与列表和散列的一点疑问

那如果cnhack说的正确的话,你说的应该不对吧(我没用过perl6)。
@list[0]可以理解,合法,
但%hash{'aaa'}肯定不应该合法!

2009/1/16 wbi 畢 <wbisearchina@hotmail.co.jp>
perl6 下 就改成
 
@list[0]    %hash{'aaa'}  合法  -- 个人觉得这样更合理些

$list[0]    $hash{'aaa'}   不合法



Date: Fri, 16 Jan 2009 09:03:03 +0800
From: bi.ken.lam@gmail.com
To: perlchina@googlegroups.com
Subject: [PerlChina] Re: perl标量与列表和散列的一点疑问


不是大家说的,是我说的:larry说要这样做的。^_^!

e280s wrote:
首先声明:这只是我的一点认识,不是来招口水的,也不涉及到perl的优劣。  1. 我建立一个列表: @list = qw/aaa bbb ccc ddd/;  我想使用@list中的aaa,于是我可以使用: @list[0]或$list[0]  2. 我建立一个散列: %hash = (     'aaa' => 'aaaa',     'bbb' => 'bbbb',     'ccc' => 'cccc' ); 我想使用aaaa,于是: $hash{'aaa'}即可。但是%hash{'aaa'}就是一个错误的用法。  疑问:是不是设计的时候设计使用@list[下标]的方式是多余的啊,而对散列没有这样一个类似的用法。  我估计大家又该说了:larry说要这样做的。^_^!  呵呵。     


--  Perl乐事 -- http://www.perlersh.org 
--~--~---------~--~----~------------~-------~--~----~
您收到此信息是由于您订阅了 Google 论坛"PerlChina 论坛"论坛。
 要在此论坛发帖,请发电子邮件到 perlchina@googlegroups.com
 要退订此论坛,请发邮件至 perlchina+unsubscribe@googlegroups.com
 更多选项,请通过 http://groups.google.com/group/perlchina?hl=zh-CN 访问该论坛

-~----------~----~----~----~------~----~------~--~---

[PerlChina] Re: perl标量与列表和散列的一点疑问

好,回答非常精辟,醍醐灌顶。本来我以为这是设计的思想上的一点错误。
 
多谢cnhack!!!

2009/1/16 cnhack TNT <cnhacktnt@gmail.com>
perl 的这些 $, @, % 等代表不同的类型,你所说的是有意这么设计的,请参考这段:

@array = (1..6);
print "@array[0,2,3]";

一般当你只取数组中一个元素的时候 $array[下标] 就好了,而且前面的 $ 说明取出来的东西是个标量;
而 perl 支持 @array[index1,index2..indexN] 这种写法是为了方便你通过多个下标一起取出多个元素,而 @ 正代表着取出的是一组元素或说一个列表(当然也可以只给它一个下标来取某一个元素,列表的元素个数也可以为一个嘛)

%hash = ( a=>1, b=>2);
print "@hash{'a', 'b'}";

而 %hash, 是唯一键值对的关系,一个键对应一个标量值,通过键得到的是标量值,而 %hash{'key'} 是啥?哈希的值是哈希?所以使用 $hash{'key'} 这种方式就是为了告诉你,通过某个key得到的是哈希里面对应的标量值。
当然,你也可以通过指定多个 key 来取多个值, 所以,这里你知道为啥通过多个 key 来取多个值用的是 @hash{'key1', 'key2' .. 'keyN'} 了吧?





2009/1/16 e280s <e280s4ever@gmail.com>

首先声明:这只是我的一点认识,不是来招口水的,也不涉及到perl的优劣。

1. 我建立一个列表:
@list = qw/aaa bbb ccc ddd/;

我想使用@list中的aaa,于是我可以使用:
@list[0]或$list[0]

2. 我建立一个散列:
%hash = (
   'aaa' => 'aaaa',
   'bbb' => 'bbbb',
   'ccc' => 'cccc'
);
我想使用aaaa,于是:
$hash{'aaa'}即可。但是%hash{'aaa'}就是一个错误的用法。

疑问:是不是设计的时候设计使用@list[下标]的方式是多余的啊,而对散列没有这样一个类似的用法。

我估计大家又该说了:larry说要这样做的。^_^!

呵呵。



--~--~---------~--~----~------------~-------~--~----~
您收到此信息是由于您订阅了 Google 论坛"PerlChina 论坛"论坛。
 要在此论坛发帖,请发电子邮件到 perlchina@googlegroups.com
 要退订此论坛,请发邮件至 perlchina+unsubscribe@googlegroups.com
 更多选项,请通过 http://groups.google.com/group/perlchina?hl=zh-CN 访问该论坛

-~----------~----~----~----~------~----~------~--~---

[PerlChina] Re: perl标量与列表和散列的一点疑问

PHP最初的版本是不是用Perl写的?:)

--
yonghua peng
http://home.arcor.de/pangj/


--- On Fri, 1/16/09, agentzh <agentzh@gmail.com> wrote:

> From: agentzh <agentzh@gmail.com>
> Subject: [PerlChina] Re: perl标量与列表和散列的一点疑问
> To: perlchina@googlegroups.com
> Date: Friday, January 16, 2009, 4:06 PM
> 2009/1/16 cnhack TNT <cnhacktnt@gmail.com>
>
> > perl 的这些 $, @, %
> 等代表不同的类型,你所说的是有意这么设计的,请参考这段:
> >
>
> 所以 Larry 经常说 PHP
> 的设计者永远也无法理解 sigil
> 的真谛,只不过学一个形似罢了,哈哈
>
> -agentzh


--~--~---------~--~----~------------~-------~--~----~
您收到此信息是由于您订阅了 Google 论坛"PerlChina 论坛"论坛。
要在此论坛发帖,请发电子邮件到 perlchina@googlegroups.com
要退订此论坛,请发邮件至 perlchina+unsubscribe@googlegroups.com
更多选项,请通过 http://groups.google.com/group/perlchina?hl=zh-CN 访问该论坛
-~----------~----~----~----~------~----~------~--~---

[PerlChina] Re: perl标量与列表和散列的一点疑问

2009/1/16 cnhack TNT <cnhacktnt@gmail.com>
perl 的这些 $, @, % 等代表不同的类型,你所说的是有意这么设计的,请参考这段:

所以 Larry 经常说 PHP 的设计者永远也无法理解 sigil 的真谛,只不过学一个形似罢了,哈哈

-agentzh

--~--~---------~--~----~------------~-------~--~----~
您收到此信息是由于您订阅了 Google 论坛"PerlChina 论坛"论坛。
 要在此论坛发帖,请发电子邮件到 perlchina@googlegroups.com
 要退订此论坛,请发邮件至 perlchina+unsubscribe@googlegroups.com
 更多选项,请通过 http://groups.google.com/group/perlchina?hl=zh-CN 访问该论坛

-~----------~----~----~----~------~----~------~--~---

[PerlChina] Re: perl标量与列表和散列的一点疑问

perl 的这些 $, @, % 等代表不同的类型,你所说的是有意这么设计的,请参考这段:

@array = (1..6);
print "@array[0,2,3]";

一般当你只取数组中一个元素的时候 $array[下标] 就好了,而且前面的 $ 说明取出来的东西是个标量;
而 perl 支持 @array[index1,index2..indexN] 这种写法是为了方便你通过多个下标一起取出多个元素,而 @ 正代表着取出的是一组元素或说一个列表(当然也可以只给它一个下标来取某一个元素,列表的元素个数也可以为一个嘛)

%hash = ( a=>1, b=>2);
print "@hash{'a', 'b'}";

而 %hash, 是唯一键值对的关系,一个键对应一个标量值,通过键得到的是标量值,而 %hash{'key'} 是啥?哈希的值是哈希?所以使用 $hash{'key'} 这种方式就是为了告诉你,通过某个key得到的是哈希里面对应的标量值。
当然,你也可以通过指定多个 key 来取多个值, 所以,这里你知道为啥通过多个 key 来取多个值用的是 @hash{'key1', 'key2' .. 'keyN'} 了吧?





2009/1/16 e280s <e280s4ever@gmail.com>
首先声明:这只是我的一点认识,不是来招口水的,也不涉及到perl的优劣。

1. 我建立一个列表:
@list = qw/aaa bbb ccc ddd/;

我想使用@list中的aaa,于是我可以使用:
@list[0]或$list[0]

2. 我建立一个散列:
%hash = (
   'aaa' => 'aaaa',
   'bbb' => 'bbbb',
   'ccc' => 'cccc'
);
我想使用aaaa,于是:
$hash{'aaa'}即可。但是%hash{'aaa'}就是一个错误的用法。

疑问:是不是设计的时候设计使用@list[下标]的方式是多余的啊,而对散列没有这样一个类似的用法。

我估计大家又该说了:larry说要这样做的。^_^!

呵呵。




--~--~---------~--~----~------------~-------~--~----~
您收到此信息是由于您订阅了 Google 论坛"PerlChina 论坛"论坛。
 要在此论坛发帖,请发电子邮件到 perlchina@googlegroups.com
 要退订此论坛,请发邮件至 perlchina+unsubscribe@googlegroups.com
 更多选项,请通过 http://groups.google.com/group/perlchina?hl=zh-CN 访问该论坛

-~----------~----~----~----~------~----~------~--~---

2009年1月15日星期四

[PerlChina] Re: perl标量与列表和散列的一点疑问

什么乱七八糟的


在2009-01-16,e280s <e280s4ever@gmail.com> 写道:
首先声明:这只是我的一点认识,不是来招口水的,也不涉及到perl的优劣。  1. 我建立一个列表: @list = qw/aaa bbb ccc ddd/;  我想使用@list中的aaa,于是我可以使用: @list[0]或$list[0]  2. 我建立一个散列: %hash = (     'aaa' => 'aaaa',     'bbb' => 'bbbb',     'ccc' => 'cccc' ); 我想使用aaaa,于是: $hash{'aaa'}即可。但是%hash{'aaa'}就是一个错误的用法。  疑问:是不是设计的时候设计使用@list[下标]的方式是多余的啊,而对散列没有这样一个类似的用法。  我估计大家又该说了:larry说要这样做的。^_^!  呵呵。    



《大话西游外传》贺岁新作,送豪宅、送你5000元压岁钱 --~--~---------~--~----~------------~-------~--~----~
您收到此信息是由于您订阅了 Google 论坛"PerlChina 论坛"论坛。
 要在此论坛发帖,请发电子邮件到 perlchina@googlegroups.com
 要退订此论坛,请发邮件至 perlchina+unsubscribe@googlegroups.com
 更多选项,请通过 http://groups.google.com/group/perlchina?hl=zh-CN 访问该论坛

-~----------~----~----~----~------~----~------~--~---

[PerlChina] Re: perl标量与列表和散列的一点疑问

相同的文件名、LIB名,perl只会load一次,见%INC的描述。
do是强制load,它与require和use的区别请见:

perldoc -q 'What's the difference between require and use?'

--
yonghua peng
http://home.arcor.de/pangj/


--- On Fri, 1/16/09, Xiaojun Deng <xjdengz@gmail.com> wrote:

> From: Xiaojun Deng <xjdengz@gmail.com>
> Subject: [PerlChina] Re: perl标量与列表和散列的一点疑问
> To: perlchina@googlegroups.com
> Date: Friday, January 16, 2009, 12:36 PM
> 如果两个文件有相同名字的变量,require或者import后会不会覆盖掉呢,怎么用
> 名字空间来区别的阿? 还有这些和do
> "some_perl_file"有何区别呢?
>
> On Fri, 2009-01-16 at 11:10 +0800, smallfish wrote:
> > 学习了。
> >
> 一直都是按照第一和第二个方法采用our共享变量的。
> >
> > --
> > blog : http://hi.baidu.com/smallfish7788
> > bbs : http://bbs.chinaunix.net/forum-55-1.html
> > smallfish(xiaoyu9805119)
> >
> > --------------------------------------------------
> > From: "yonghua"
> <yonghua_peng@yahoo.com.cn>
> > Sent: Friday, January 16, 2009 11:03 AM
> > To: <perlchina@googlegroups.com>
> > Subject: [PerlChina] Re:
> perl标量与列表和散列的一点疑问
> >
> > >
> > >
> > > --- On Fri, 1/16/09, Ben_Chan@WISTRON.COM
> <Ben_Chan@WISTRON.COM> wrote:
> > >
> > >> From: Ben_Chan@WISTRON.COM
> <Ben_Chan@WISTRON.COM>
> > >> Subject: [PerlChina] Re:
> perl标量与列表和散列的一点疑问
> > >> To: perlchina@googlegroups.com
> > >> Date: Friday, January 16, 2009, 10:50 AM
> > >> "There's more than one way to do it"
> > >> 简单易用就好吧,面向对象之类的
> > >>
> 都是一个想法而已,C也可以写成面向对象的风格啊
> > >
> > >
> > >
> 不是想法不想法的问题,而是某些情形下,OO可以节省内存、提高性能。
> > >
> 跟老外合作过不少MP项目,这方面深有体会。
> > > 写过一篇FAQ release在mailing
> lists上,看看或许有所参考:
> > >
> > >
> http://home.arcor.de/pangj/share_variables_between_perl_scripts.txt
> > >
> > >
> > > Jeff.
> > >
> > > >
> > >
> >
> > >
>
>
>

--~--~---------~--~----~------------~-------~--~----~
您收到此信息是由于您订阅了 Google 论坛"PerlChina 论坛"论坛。
要在此论坛发帖,请发电子邮件到 perlchina@googlegroups.com
要退订此论坛,请发邮件至 perlchina+unsubscribe@googlegroups.com
更多选项,请通过 http://groups.google.com/group/perlchina?hl=zh-CN 访问该论坛
-~----------~----~----~----~------~----~------~--~---

[PerlChina] Re: perl标量与列表和散列的一点疑问

如果两个文件有相同名字的变量,require或者import后会不会覆盖掉呢,怎么用
名字空间来区别的阿? 还有这些和do "some_perl_file"有何区别呢?

On Fri, 2009-01-16 at 11:10 +0800, smallfish wrote:
> 学习了。
> 一直都是按照第一和第二个方法采用our共享变量的。
>
> --
> blog : http://hi.baidu.com/smallfish7788
> bbs : http://bbs.chinaunix.net/forum-55-1.html
> smallfish(xiaoyu9805119)
>
> --------------------------------------------------
> From: "yonghua" <yonghua_peng@yahoo.com.cn>
> Sent: Friday, January 16, 2009 11:03 AM
> To: <perlchina@googlegroups.com>
> Subject: [PerlChina] Re: perl标量与列表和散列的一点疑问
>
> >
> >
> > --- On Fri, 1/16/09, Ben_Chan@WISTRON.COM <Ben_Chan@WISTRON.COM> wrote:
> >
> >> From: Ben_Chan@WISTRON.COM <Ben_Chan@WISTRON.COM>
> >> Subject: [PerlChina] Re: perl标量与列表和散列的一点疑问
> >> To: perlchina@googlegroups.com
> >> Date: Friday, January 16, 2009, 10:50 AM
> >> "There's more than one way to do it"
> >> 简单易用就好吧,面向对象之类的
> >> 都是一个想法而已,C也可以写成面向对象的风格啊
> >
> >
> > 不是想法不想法的问题,而是某些情形下,OO可以节省内存、提高性能。
> > 跟老外合作过不少MP项目,这方面深有体会。
> > 写过一篇FAQ release在mailing lists上,看看或许有所参考:
> >
> > http://home.arcor.de/pangj/share_variables_between_perl_scripts.txt
> >
> >
> > Jeff.
> >
> > >
> >
>
> >


--~--~---------~--~----~------------~-------~--~----~
您收到此信息是由于您订阅了 Google 论坛"PerlChina 论坛"论坛。
要在此论坛发帖,请发电子邮件到 perlchina@googlegroups.com
要退订此论坛,请发邮件至 perlchina+unsubscribe@googlegroups.com
更多选项,请通过 http://groups.google.com/group/perlchina?hl=zh-CN 访问该论坛
-~----------~----~----~----~------~----~------~--~---

[PerlChina] Re: perl标量与列表和散列的一点疑问

与name space有关的概念吧,可以参考:
http://perl.plover.com/FAQs/Namespaces.html

--
yonghua peng
http://home.arcor.de/pangj/


--- On Fri, 1/16/09, Ben_Chan@WISTRON.COM <Ben_Chan@WISTRON.COM> wrote:

> From: Ben_Chan@WISTRON.COM <Ben_Chan@WISTRON.COM>
> Subject: [PerlChina] Re: perl标量与列表和散列的一点疑问
> To: perlchina@googlegroups.com
> Date: Friday, January 16, 2009, 12:17 PM
> 我对Perl了解不多,没能领会用子程序封装一下变量与直接定义的变量可以带来节省内
> 存的好处,希望告知哪里有更多参考资料,有空我也多学习学习,谢谢.


--~--~---------~--~----~------------~-------~--~----~
您收到此信息是由于您订阅了 Google 论坛"PerlChina 论坛"论坛。
要在此论坛发帖,请发电子邮件到 perlchina@googlegroups.com
要退订此论坛,请发邮件至 perlchina+unsubscribe@googlegroups.com
更多选项,请通过 http://groups.google.com/group/perlchina?hl=zh-CN 访问该论坛
-~----------~----~----~----~------~----~------~--~---

[PerlChina] Re: perl标量与列表和散列的一点疑问

我对Perl了解不多,没能领会用子程序封装一下变量与直接定义的变量可以带来节省内
存的好处,希望告知哪里有更多参考资料,有空我也多学习学习,谢谢.
这样做我觉得可读性较好,可以将多组数据封装到一个文件,根据不同的sub去取数
据,
个人觉得处理较复杂的数据及运算不如C/Java之类来的易于理解和传递,也便于维护.


下面代码为Jeff Pang提供
====================================================================
How to share a variable between two Perl scripts?
(or: How to read the variables in a config file into Perl script?)
====================================================================


There are some ways to do it. I may show 3 ways below:


#########################
# the first way
#########################
The first way,you can just require a file,because this file hasn't be
declared as a package,it doesn't have its own namespace.So all global
variables in this file can be imported into main script's namespace.

$ cat mydata.pl
use strict;
our (@key1,@key2);
$key1[64]="0xc120718a1ccce7f8";
$key2[64]="0xeadf28cb82020921";
$key1[128]="0xaf503224b6cff0639cf0dc310a4b1277";
$key2[128]="0x3e1fcbd4e91ca24bb276914de3764cdf";
1;

$ cat usedata.pl
require 'mydata.pl';
print $key1[64];


#########################
# the second way
#########################
The second way,you can declare the config file as a package,and export
the needed varibles distinctly.When main script uses this package,it
imports those variables automatically.

$ cat mydata2.pm
package mydata2;
use strict;
require Exporter;
our @ISA = qw(Exporter);
our (@key1,@key2);
our @EXPORT = qw(@key1 @key2);

$key1[64]="0xc120718a1ccce7f8";
$key2[64]="0xeadf28cb82020921";
$key1[128]="0xaf503224b6cff0639cf0dc310a4b1277";
$key2[128]="0x3e1fcbd4e91ca24bb276914de3764cdf";

1;

$ cat usedata2.pl
use mydata2;
print $key1[64];


#########################
# the third way
#########################
Both the first way and the second way are not good enough.For example,
under mod_perl,there may are more than one script in a process.Since
each script imports the same (maybe huge) content from a file,that
wastes the memory.
So the better way is to create an object then all scripts in the same
process can share the object.This can save memory because all variables
tied to the object are located only in their own namespace.

$ cat mydata3.pm
package mydata3;
use strict;

sub new {
my $class = shift;
my (@key1,@key2);

$key1[64]="0xc120718a1ccce7f8";
$key2[64]="0xeadf28cb82020921";
$key1[128]="0xaf503224b6cff0639cf0dc310a4b1277";
$key2[128]="0x3e1fcbd4e91ca24bb276914de3764cdf";

bless {key1=>\@key1,key2=>\@key2},$class;
}

1;

$ cat usedata3.pl
use mydata3;
my $d = mydata3->new;
print $d->{key1}->[64];

> -----Original Message-----
> From: perlchina@googlegroups.com
> [mailto:perlchina@googlegroups.com] On Behalf Of yonghua
> Sent: Friday, January 16, 2009 11:04 AM
> To: perlchina@googlegroups.com
> Subject: [PerlChina] Re: perl标量与列表和散列的一点疑问
>
>
>
> --- On Fri, 1/16/09, Ben_Chan@WISTRON.COM
> <Ben_Chan@WISTRON.COM> wrote:
>
> > From: Ben_Chan@WISTRON.COM <Ben_Chan@WISTRON.COM>
> > Subject: [PerlChina] Re: perl标量与列表和散列的一点疑问
> > To: perlchina@googlegroups.com
> > Date: Friday, January 16, 2009, 10:50 AM "There's more than
> one way to
> > do it"
> > 简单易用就好吧,面向对象之类的
> > 都是一个想法而已,C也可以写成面向对象的风格啊
>
>
> 不是想法不想法的问题,而是某些情形下,OO可以节省内存、提高性能。
> 跟老外合作过不少MP项目,这方面深有体会。
> 写过一篇FAQ release在mailing lists上,看看或许有所参考:
>
> http://home.arcor.de/pangj/share_variables_between_perl_scripts.txt
>
>
> Jeff.
>
> --~--~---------~--~----~------------~-------~--~----~
> 您收到此信息是由于您订阅了 Google 论坛"PerlChina 论坛"论坛。
> 要在此论坛发帖,请发电子邮件到 perlchina@googlegroups.com
> 要退订此论坛,请发邮件至 perlchina+unsubscribe@googlegroups.com
> 更多选项,请通过 http://groups.google.com/group/perlchina?hl=zh-CN 访问该
论坛
> -~----------~----~----~----~------~----~------~--~---
>
>

[PerlChina] Re: perl标量与列表和散列的一点疑问

学习了。
一直都是按照第一和第二个方法采用our共享变量的。

--
blog : http://hi.baidu.com/smallfish7788
bbs : http://bbs.chinaunix.net/forum-55-1.html
smallfish(xiaoyu9805119)

--------------------------------------------------
From: "yonghua" <yonghua_peng@yahoo.com.cn>
Sent: Friday, January 16, 2009 11:03 AM
To: <perlchina@googlegroups.com>
Subject: [PerlChina] Re: perl标量与列表和散列的一点疑问

>
>
> --- On Fri, 1/16/09, Ben_Chan@WISTRON.COM <Ben_Chan@WISTRON.COM> wrote:
>
>> From: Ben_Chan@WISTRON.COM <Ben_Chan@WISTRON.COM>
>> Subject: [PerlChina] Re: perl标量与列表和散列的一点疑问
>> To: perlchina@googlegroups.com
>> Date: Friday, January 16, 2009, 10:50 AM
>> "There's more than one way to do it"
>> 简单易用就好吧,面向对象之类的
>> 都是一个想法而已,C也可以写成面向对象的风格啊
>
>
> 不是想法不想法的问题,而是某些情形下,OO可以节省内存、提高性能。
> 跟老外合作过不少MP项目,这方面深有体会。
> 写过一篇FAQ release在mailing lists上,看看或许有所参考:
>
> http://home.arcor.de/pangj/share_variables_between_perl_scripts.txt
>
>
> Jeff.
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
您收到此信息是由于您订阅了 Google 论坛"PerlChina 论坛"论坛。
要在此论坛发帖,请发电子邮件到 perlchina@googlegroups.com
要退订此论坛,请发邮件至 perlchina+unsubscribe@googlegroups.com
更多选项,请通过 http://groups.google.com/group/perlchina?hl=zh-CN 访问该论坛
-~----------~----~----~----~------~----~------~--~---

[PerlChina] Re: perl标量与列表和散列的一点疑问

--- On Fri, 1/16/09, Ben_Chan@WISTRON.COM <Ben_Chan@WISTRON.COM> wrote:

> From: Ben_Chan@WISTRON.COM <Ben_Chan@WISTRON.COM>
> Subject: [PerlChina] Re: perl标量与列表和散列的一点疑问
> To: perlchina@googlegroups.com
> Date: Friday, January 16, 2009, 10:50 AM
> "There's more than one way to do it"
> 简单易用就好吧,面向对象之类的
> 都是一个想法而已,C也可以写成面向对象的风格啊


不是想法不想法的问题,而是某些情形下,OO可以节省内存、提高性能。
跟老外合作过不少MP项目,这方面深有体会。
写过一篇FAQ release在mailing lists上,看看或许有所参考:

http://home.arcor.de/pangj/share_variables_between_perl_scripts.txt


Jeff.

--~--~---------~--~----~------------~-------~--~----~
您收到此信息是由于您订阅了 Google 论坛"PerlChina 论坛"论坛。
要在此论坛发帖,请发电子邮件到 perlchina@googlegroups.com
要退订此论坛,请发邮件至 perlchina+unsubscribe@googlegroups.com
更多选项,请通过 http://groups.google.com/group/perlchina?hl=zh-CN 访问该论坛
-~----------~----~----~----~------~----~------~--~---

[PerlChina] Re: perl标量与列表和散列的一点疑问

"There's more than one way to do it"
简单易用就好吧,面向对象之类的 都是一个想法而已,C也可以写成面向对象的风格啊
如果实在要用那样风格的代码,还是自己封装一个吧,也许用了一些时间后终于发现原
作者为什么选择这样。
>
>

[PerlChina] Re: perl标量与列表和散列的一点疑问

Perl不适合开发"大"项目,因为类似功能的Perl代码总是比Java什么的要短小。所以用Java什么的开发的项目都是"大"项目...

2009/1/16 e280s 4ever <e280s4ever@gmail.com>:
> 其实我觉得一个事物,不必要非追求大全。
>
> 有自己的定位就好。perl在命令行处理文本还是王。写简单的程序也可以,只是可能开发大项目不适合。
>
> 可是,我们非的使用perl开发大项目吗?
>
> 2009/1/16 Shu Cho <neatcho@gmail.com>
>>
>> 不是Perl了,是Perl 6了。嗯...
>>
>> 2009/1/16 e280s 4ever <e280s4ever@gmail.com>:
>> > 不过如果是在perl6中:
>> > 类似$list[1]和$hash{'aaa'}这些都替换成了:@list[1]和%hash{'aaa'}
>> >
>> > 是不是改的也太多了。貌似这样就不是perl了。
>> >
>> > 2009/1/16 yonghua <yonghua_peng@yahoo.com.cn>
>> >>
>> >>
>> >> OO还是很实用的,尤其是对多人合作项目。
>> >> 有空看看perl-jobs邮件列表,每一个招聘贴都要求会Perl OO。
>> >>
>> >> --
>> >> yonghua peng
>> >> http://home.arcor.de/pangj/
>> >>
>> >>
>> >> --- On Fri, 1/16/09, e280s 4ever <e280s4ever@gmail.com> wrote:
>> >>
>> >> > From: e280s 4ever <e280s4ever@gmail.com>
>> >> > Subject: [PerlChina] Re: perl标量与列表和散列的一点疑问
>> >> > To: perlchina@googlegroups.com
>> >> > Date: Friday, January 16, 2009, 9:13 AM
>> >> > 干吗非追求面向对象。
>> >> > 现在的功能不够用么?
>> >> >
>> >>
>> >> >>
>> >
>> >>
>

--~--~---------~--~----~------------~-------~--~----~
您收到此信息是由于您订阅了 Google 论坛"PerlChina 论坛"论坛。
要在此论坛发帖,请发电子邮件到 perlchina@googlegroups.com
要退订此论坛,请发邮件至 perlchina+unsubscribe@googlegroups.com
更多选项,请通过 http://groups.google.com/group/perlchina?hl=zh-CN 访问该论坛
-~----------~----~----~----~------~----~------~--~---

[PerlChina] Re: perl标量与列表和散列的一点疑问

我是从java跑向perl了

From: agentzh
Sent: Friday, January 16, 2009 10:37 AM
Subject: [PerlChina] Re: perl标量与列表和散列的一点疑问

2009/1/16 e280s 4ever <e280s4ever@gmail.com>
可是,我们非的使用perl开发大项目吗?

嗯,好极了,我们还是用 Java 吧!

-agentzh

--~--~---------~--~----~------------~-------~--~----~
您收到此信息是由于您订阅了 Google 论坛"PerlChina 论坛"论坛。
 要在此论坛发帖,请发电子邮件到 perlchina@googlegroups.com
 要退订此论坛,请发邮件至 perlchina+unsubscribe@googlegroups.com
 更多选项,请通过 http://groups.google.com/group/perlchina?hl=zh-CN 访问该论坛

-~----------~----~----~----~------~----~------~--~---

[PerlChina] Re: perl标量与列表和散列的一点疑问

2009/1/16 e280s 4ever <e280s4ever@gmail.com>
可是,我们非的使用perl开发大项目吗?

嗯,好极了,我们还是用 Java 吧!

-agentzh


--~--~---------~--~----~------------~-------~--~----~
您收到此信息是由于您订阅了 Google 论坛"PerlChina 论坛"论坛。
 要在此论坛发帖,请发电子邮件到 perlchina@googlegroups.com
 要退订此论坛,请发邮件至 perlchina+unsubscribe@googlegroups.com
 更多选项,请通过 http://groups.google.com/group/perlchina?hl=zh-CN 访问该论坛

-~----------~----~----~----~------~----~------~--~---

[PerlChina] Re: perl标量与列表和散列的一点疑问

以前很多人是这么认为的,现在不是了。请看看rakudo.org

2009/1/16 e280s 4ever <e280s4ever@gmail.com>:
> 我好象记得很多人都认为perl6是不会来了。
>
> 2009/1/16 Shu Cho <neatcho@gmail.com>
>>
>> 不是Perl了,是Perl 6了。嗯...
>>
>> 2009/1/16 e280s 4ever <e280s4ever@gmail.com>:
>> > 不过如果是在perl6中:
>> > 类似$list[1]和$hash{'aaa'}这些都替换成了:@list[1]和%hash{'aaa'}
>> >
>> > 是不是改的也太多了。貌似这样就不是perl了。
>> >
>> > 2009/1/16 yonghua <yonghua_peng@yahoo.com.cn>
>> >>
>> >>
>> >> OO还是很实用的,尤其是对多人合作项目。
>> >> 有空看看perl-jobs邮件列表,每一个招聘贴都要求会Perl OO。
>> >>
>> >> --
>> >> yonghua peng
>> >> http://home.arcor.de/pangj/
>> >>
>> >>
>> >> --- On Fri, 1/16/09, e280s 4ever <e280s4ever@gmail.com> wrote:
>> >>
>> >> > From: e280s 4ever <e280s4ever@gmail.com>
>> >> > Subject: [PerlChina] Re: perl标量与列表和散列的一点疑问
>> >> > To: perlchina@googlegroups.com
>> >> > Date: Friday, January 16, 2009, 9:13 AM
>> >> > 干吗非追求面向对象。
>> >> > 现在的功能不够用么?
>> >> >
>> >>
>> >> >>
>> >
>> >>
>

--~--~---------~--~----~------------~-------~--~----~
您收到此信息是由于您订阅了 Google 论坛"PerlChina 论坛"论坛。
要在此论坛发帖,请发电子邮件到 perlchina@googlegroups.com
要退订此论坛,请发邮件至 perlchina+unsubscribe@googlegroups.com
更多选项,请通过 http://groups.google.com/group/perlchina?hl=zh-CN 访问该论坛
-~----------~----~----~----~------~----~------~--~---

[PerlChina] Re: perl标量与列表和散列的一点疑问

其实我觉得一个事物,不必要非追求大全。
 
有自己的定位就好。perl在命令行处理文本还是王。写简单的程序也可以,只是可能开发大项目不适合。
 
可是,我们非的使用perl开发大项目吗?

2009/1/16 Shu Cho <neatcho@gmail.com>
不是Perl了,是Perl 6了。嗯...

2009/1/16 e280s 4ever <e280s4ever@gmail.com>:
> 不过如果是在perl6中:
> 类似$list[1]和$hash{'aaa'}这些都替换成了:@list[1]和%hash{'aaa'}
>
> 是不是改的也太多了。貌似这样就不是perl了。
>
> 2009/1/16 yonghua <yonghua_peng@yahoo.com.cn>
>>
>>
>> OO还是很实用的,尤其是对多人合作项目。
>> 有空看看perl-jobs邮件列表,每一个招聘贴都要求会Perl OO。
>>
>> --
>> yonghua peng
>> http://home.arcor.de/pangj/
>>
>>
>> --- On Fri, 1/16/09, e280s 4ever <e280s4ever@gmail.com> wrote:
>>
>> > From: e280s 4ever <e280s4ever@gmail.com>
>> > Subject: [PerlChina] Re: perl标量与列表和散列的一点疑问
>> > To: perlchina@googlegroups.com
>> > Date: Friday, January 16, 2009, 9:13 AM
>> > 干吗非追求面向对象。
>> > 现在的功能不够用么?
>> >
>>
>> >>
>
--~--~---------~--~----~------------~-------~--~----~
您收到此信息是由于您订阅了 Google 论坛"PerlChina 论坛"论坛。
 要在此论坛发帖,请发电子邮件到 perlchina@googlegroups.com
 要退订此论坛,请发邮件至 perlchina+unsubscribe@googlegroups.com
 更多选项,请通过 http://groups.google.com/group/perlchina?hl=zh-CN 访问该论坛

-~----------~----~----~----~------~----~------~--~---

[PerlChina] Re: perl标量与列表和散列的一点疑问

我好象记得很多人都认为perl6是不会来了。

2009/1/16 Shu Cho <neatcho@gmail.com>
不是Perl了,是Perl 6了。嗯...

2009/1/16 e280s 4ever <e280s4ever@gmail.com>:
> 不过如果是在perl6中:
> 类似$list[1]和$hash{'aaa'}这些都替换成了:@list[1]和%hash{'aaa'}
>
> 是不是改的也太多了。貌似这样就不是perl了。
>
> 2009/1/16 yonghua <yonghua_peng@yahoo.com.cn>
>>
>>
>> OO还是很实用的,尤其是对多人合作项目。
>> 有空看看perl-jobs邮件列表,每一个招聘贴都要求会Perl OO。
>>
>> --
>> yonghua peng
>> http://home.arcor.de/pangj/
>>
>>
>> --- On Fri, 1/16/09, e280s 4ever <e280s4ever@gmail.com> wrote:
>>
>> > From: e280s 4ever <e280s4ever@gmail.com>
>> > Subject: [PerlChina] Re: perl标量与列表和散列的一点疑问
>> > To: perlchina@googlegroups.com
>> > Date: Friday, January 16, 2009, 9:13 AM
>> > 干吗非追求面向对象。
>> > 现在的功能不够用么?
>> >
>>
>> >>
>
--~--~---------~--~----~------------~-------~--~----~
您收到此信息是由于您订阅了 Google 论坛"PerlChina 论坛"论坛。
 要在此论坛发帖,请发电子邮件到 perlchina@googlegroups.com
 要退订此论坛,请发邮件至 perlchina+unsubscribe@googlegroups.com
 更多选项,请通过 http://groups.google.com/group/perlchina?hl=zh-CN 访问该论坛

-~----------~----~----~----~------~----~------~--~---

[PerlChina] Re: perl标量与列表和散列的一点疑问

不是Perl了,是Perl 6了。嗯...

2009/1/16 e280s 4ever <e280s4ever@gmail.com>:
> 不过如果是在perl6中:
> 类似$list[1]和$hash{'aaa'}这些都替换成了:@list[1]和%hash{'aaa'}
>
> 是不是改的也太多了。貌似这样就不是perl了。
>
> 2009/1/16 yonghua <yonghua_peng@yahoo.com.cn>
>>
>>
>> OO还是很实用的,尤其是对多人合作项目。
>> 有空看看perl-jobs邮件列表,每一个招聘贴都要求会Perl OO。
>>
>> --
>> yonghua peng
>> http://home.arcor.de/pangj/
>>
>>
>> --- On Fri, 1/16/09, e280s 4ever <e280s4ever@gmail.com> wrote:
>>
>> > From: e280s 4ever <e280s4ever@gmail.com>
>> > Subject: [PerlChina] Re: perl标量与列表和散列的一点疑问
>> > To: perlchina@googlegroups.com
>> > Date: Friday, January 16, 2009, 9:13 AM
>> > 干吗非追求面向对象。
>> > 现在的功能不够用么?
>> >
>>
>> >>
>

--~--~---------~--~----~------------~-------~--~----~
您收到此信息是由于您订阅了 Google 论坛"PerlChina 论坛"论坛。
要在此论坛发帖,请发电子邮件到 perlchina@googlegroups.com
要退订此论坛,请发邮件至 perlchina+unsubscribe@googlegroups.com
更多选项,请通过 http://groups.google.com/group/perlchina?hl=zh-CN 访问该论坛
-~----------~----~----~----~------~----~------~--~---

[PerlChina] Re: perl标量与列表和散列的一点疑问

不过如果是在perl6中:
类似$list[1]和$hash{'aaa'}这些都替换成了:@list[1]和%hash{'aaa'}
 
是不是改的也太多了。貌似这样就不是perl了。

2009/1/16 yonghua <yonghua_peng@yahoo.com.cn>


OO还是很实用的,尤其是对多人合作项目。
有空看看perl-jobs邮件列表,每一个招聘贴都要求会Perl OO。

--
yonghua peng
http://home.arcor.de/pangj/


--- On Fri, 1/16/09, e280s 4ever <e280s4ever@gmail.com> wrote:

> From: e280s 4ever <e280s4ever@gmail.com>
> Subject: [PerlChina] Re: perl标量与列表和散列的一点疑问
> To: perlchina@googlegroups.com
> Date: Friday, January 16, 2009, 9:13 AM
> 干吗非追求面向对象。
> 现在的功能不够用么?
>

--~--~---------~--~----~------------~-------~--~----~
您收到此信息是由于您订阅了 Google 论坛"PerlChina 论坛"论坛。
 要在此论坛发帖,请发电子邮件到 perlchina@googlegroups.com
 要退订此论坛,请发邮件至 perlchina+unsubscribe@googlegroups.com
 更多选项,请通过 http://groups.google.com/group/perlchina?hl=zh-CN 访问该论坛

-~----------~----~----~----~------~----~------~--~---

[PerlChina] Re: perl标量与列表和散列的一点疑问

恩。OO的思想一定要懂。

如果只是写了随手就扔的程序还是不需要那么复杂了。:)

--
blog : http://hi.baidu.com/smallfish7788
bbs : http://bbs.chinaunix.net/forum-55-1.html
smallfish(xiaoyu9805119)

--------------------------------------------------
From: "yonghua" <yonghua_peng@yahoo.com.cn>
Sent: Friday, January 16, 2009 10:23 AM
To: <perlchina@googlegroups.com>
Subject: [PerlChina] Re: perl标量与列表和散列的一点疑问

>
>
> OO还是很实用的,尤其是对多人合作项目。
> 有空看看perl-jobs邮件列表,每一个招聘贴都要求会Perl OO。
>
> --
> yonghua peng
> http://home.arcor.de/pangj/
>
>
> --- On Fri, 1/16/09, e280s 4ever <e280s4ever@gmail.com> wrote:
>
>> From: e280s 4ever <e280s4ever@gmail.com>
>> Subject: [PerlChina] Re: perl标量与列表和散列的一点疑问
>> To: perlchina@googlegroups.com
>> Date: Friday, January 16, 2009, 9:13 AM
>> 干吗非追求面向对象。
>> 现在的功能不够用么?
>>
>
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
您收到此信息是由于您订阅了 Google 论坛"PerlChina 论坛"论坛。
要在此论坛发帖,请发电子邮件到 perlchina@googlegroups.com
要退订此论坛,请发邮件至 perlchina+unsubscribe@googlegroups.com
更多选项,请通过 http://groups.google.com/group/perlchina?hl=zh-CN 访问该论坛
-~----------~----~----~----~------~----~------~--~---