- 论坛徽章:
- 13
|
> 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 |
|