免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
楼主: mq110
打印 上一主题 下一主题

做为脚本语言来说perl和python那个更有优势? [复制链接]

论坛徽章:
0
221 [报告]
发表于 2012-05-25 14:25 |只看该作者
自己觉得那个用着舒服就用哪个就行了,没必要争辩孰优孰劣。

论坛徽章:
1
2015年辞旧岁徽章
日期:2015-03-03 16:54:15
222 [报告]
发表于 2012-07-09 23:49 |只看该作者
回复 1# mq110


    我感觉  python  写的程序很容易看懂

    另外,做同样一件事情, python 写的代码量    比 java  和  c   少多了

    perl  没用过, 不过听说, 自己写的程序,放2月  以后 ,  自己也看不懂了

    不说语法,  刚说语言功能本身, perl 和python   是一个级别吧。

    听说 lisp  语言的功能最强大了,不过也没有学。
      

论坛徽章:
31
CU大牛徽章
日期:2013-03-13 15:15:08CU大牛徽章
日期:2013-05-20 10:46:18CU大牛徽章
日期:2013-05-20 10:46:25CU大牛徽章
日期:2013-05-20 10:46:31CU大牛徽章
日期:2013-05-20 10:46:38CU大牛徽章
日期:2013-05-20 10:46:44CU大牛徽章
日期:2013-09-18 15:16:55CU大牛徽章
日期:2013-09-18 15:18:22CU大牛徽章
日期:2013-09-18 15:18:43CU十二周年纪念徽章
日期:2013-10-24 15:41:34丑牛
日期:2013-12-01 10:11:07水瓶座
日期:2014-01-15 08:47:25
223 [报告]
发表于 2012-07-10 14:58 |只看该作者
每次看 flw 版主的发言都 会又一次洗礼!!

论坛徽章:
0
224 [报告]
发表于 2012-07-11 02:24 |只看该作者
回复 1# mq110


    你会用那个,那个就有优势,优势就是你会用

论坛徽章:
1
2015年辞旧岁徽章
日期:2015-03-03 16:54:15
225 [报告]
发表于 2012-07-17 00:17 |只看该作者
回复 49# bleem1998


    现在做网站, 做数据分析,科学计算 有很多用python 的。
能吃饭的多了。
   
      正如我们不懂计算机 机器和汇编语言照样干活。
     不懂 c , 只要能用python 做出创造性的工作, money 也大大的有
     而用 c做个驱动,界面啥的, 也就是些死套子。

论坛徽章:
0
226 [报告]
发表于 2012-07-18 09:54 |只看该作者
不知道楼主现在是什么水平了???

论坛徽章:
0
227 [报告]
发表于 2012-07-18 10:37 |只看该作者
推荐使用:python
perl和python应用领域相似,同时也都属于系统管理员的最爱

但从长期维护和大型项目考虑,使用python代码结构清晰,更易于维护和二次更新。

论坛徽章:
13
15-16赛季CBA联赛之同曦
日期:2016-01-28 19:52:032015亚冠之北京国安
日期:2015-10-07 14:28:19NBA常规赛纪念章
日期:2015-05-04 22:32:03处女座
日期:2015-01-15 19:45:44卯兔
日期:2014-10-28 16:17:14白羊座
日期:2014-05-24 15:10:46寅虎
日期:2014-05-10 09:50:35白羊座
日期:2014-03-12 20:52:17午马
日期:2014-03-01 08:37:27射手座
日期:2014-02-19 19:26:54子鼠
日期:2013-11-30 09:03:56狮子座
日期:2013-09-08 08:37:52
228 [报告]
发表于 2012-07-18 16:01 |只看该作者
> Is it better to learn Perl or Python since i can manage only writing
> simple bash shell scripts.

It depends on more things, like the things you need to do, the language prefered by your team members, the platform you are targeting, etc.

If you need to do cli system administration, Perl is better.
If you need to do very many programs in many fields, Perl is better because there are very modules on CPAN that can help you.
If you need to do web programming, Perl is better if you consider to use the tools like Catalyst framework, DBIx::Class ORM, Template-Toolkit templating system, HTML::FormFu or HTML::FormHandler form processors and many other modules you can get from CPAN.

If you need to do programs that interact with the GUI of the OS, Python is better.
If you need support for Windows or for apps with a GUI, Python is better.
If you need to do programs to run on Symbian-based phones, Python is a choice while Perl is not (because symbianperl doesn't really exist).

If you work alone and you respect the best practices, Perl can be as clear as Python but if you work in a team, more and more new programmers consider to learn Python and not Perl, because Python code is clearer.
If you need to work in a team which has blind programmers, Perl is better because the punctuation chars that makes Perl code uglier makes the code more accessible than the Python code which needs a strict indentation.

If you want to use something trendy, Python is a much better choice these days.



perl sed & awk 的区别
bash   -   GNU   Bourne-Again   Shell
gawk   -   Pattern   Scanning   and   Processing   Language
sed   -   a   Stream   Editor   
perl   -   Practical   Extraction   and   Report   Language
perl : powerful like ksh, fast, use widely   
awk  : basic using in shell script,  also write awk script   
bash : provide user interface, also provide some command   
sed  : line editor, oriented  lines  
perl 是一种很强的编程语言,你几乎可以用它做任何事情,awk 则简单多了,主要用来处理具有一定格式的文件。如果是 shell 编程,awk、sed 等都是不可缺少的工具,当然 perl 完全可以替代 awk、sed、grep 等命令.

FROM: http://blog.chinaunix.net/uid-25256412-id-91255.html

论坛徽章:
0
229 [报告]
发表于 2012-07-25 21:48 |只看该作者
回复 32# flw


    如果我回北京了。可以带你去

论坛徽章:
0
230 [报告]
发表于 2012-07-25 21:50 |只看该作者
赶上个老坟
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP