TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Learn Perl in about 2 hours 30 minutes

175 点作者 utkarshkukreti将近 14 年前

21 条评论

wallfly将近 14 年前
Over the past week I've read "Modern Perl", and will finish it later today:<p><a href="http://onyxneon.com/books/modern_perl/" rel="nofollow">http://onyxneon.com/books/modern_perl/</a><p>The ebook/PDF edition is free! It's a great book for learning (modern) Perl basics if you're already familiar with programming concepts and another language like JavaScript (which is where I'm coming from).<p>Actually, I think the knowledge and best-practices gleaned from the book will help to make me a better programmer in a general sense (not just in terms of the Perl language). It's well written, a pleasure to read and I highly recommend it.
评论 #2835375 未加载
评论 #2834289 未加载
bbbbbbbbb将近 14 年前
Perl is a really great language that i came to love over the years. First, I've been writing PHP stuff then moved to Perl and experienced Java,Actionscript,Javascript,Objective-C,Python... But all of them, Perl was the most powerful and expressive language.<p>For those who learn Javascript, Perl object literal notation should be really easy to get and if you do some jQuery stuff, many things should come naturally to you somehow. Perl supports packages, closure, utf8 since many years whereas they are just coming to PHP (It's a real pain to go back to PHP for some projects... as it looks like a huge trash of functions in the global namespace with no cohesion at all... working with array_<i>, mb_</i> or preg_* functions is such a pain... hopefully the doc helps in understanding the quirks of the language). The integration of regex as an operator is so nice. q[] or qq[] helps quite a lot and I quickly miss them... Controlling each instance of the program flow in code is very powerful too.<p>I guess the very minimalistic OOP system shipped with Perl did not help get Perl across the board of a wider range of company...<p>Obviously, this le/gend/ary image of unreadable code that one-liners, and to some extend sysadmin community, gave to the language has left a very bad taste in the mouth... and it is now very hard to get rid of.<p>when you look at <a href="http://mojolicio.us/" rel="nofollow">http://mojolicio.us/</a> or <a href="http://perldancer.org/" rel="nofollow">http://perldancer.org/</a> for web development, Perl::Critic that analyzes your code for bad coding habits(JSLink like), perltidy that reformat your code to follow your conventions or Devel::NYTProf to profile every line of your code... I don't even talk about CPAN that has always get the job done for me in like 90% of the case...<p>I still have to find a language that offers such a powerful ecosystem.<p>And for those who wonder, Perl is very active here in Japan.
评论 #2837063 未加载
bluekeybox将近 14 年前
If you <i>really</i> want to learn Perl, you <i>must</i> install the read-eval-print loop (REPL) utility. If you have never used this utility, I will have serious grounds to doubt your Perl skills.<p>Unlike Ruby or Python (or most other modern high-level programming languages), Perl does not come with an interactive REPL shell, which makes no sense at all, since, due to Perl's obscure syntax, someone trying out Perl would benefit at least twice as much from a REPL shell than someone learning Ruby or Python. Fortunately, the Devel::REPL package remedies this. Installing it is super-simple:<p><pre><code> $ sudo /usr/bin/perl -MCPAN -e shell &#62; install Devel::REPL </code></pre> Once installed, simply open your terminal and run:<p><pre><code> $ re.pl </code></pre> Once you have the REPL shell running, you can pretty much copy-and-paste into it examples from this tutorial (or any other) and watch what Perl has to say in response.
评论 #2835931 未加载
评论 #2835074 未加载
评论 #2836907 未加载
评论 #2834708 未加载
michaelpinto将近 14 年前
I've been working with Perl programmers for just about ten years now and the one thing I've sadly learned is that while many folks claim to know Perl, but only a small group can do it well. (although granted you can apply this reality to any other programming language)
评论 #2835047 未加载
评论 #2835415 未加载
评论 #2834833 未加载
TheRevoltingX将近 14 年前
Perl rocks, I can testify to this: <a href="http://4.bp.blogspot.com/_Vtq6sCdzyKs/TK8Fooqqt9I/AAAAAAAAAGY/AdcMq7zxYUA/s1600/solomon_single_server.png" rel="nofollow">http://4.bp.blogspot.com/_Vtq6sCdzyKs/TK8Fooqqt9I/AAAAAAAAAG...</a><p>I built a 2D mmorpg using Perl and Erlang. The languages a lot of people whine about when it comes to syntax. Syntax is the LAST thing I had to worry. I'm really happy that I chose those two languages.
mellery451将近 14 年前
I do wish he had mentioned the smart match operator ~~ as it nearly eliminates the confusion between EQ and ==. Of course, if you're dealing with legacy code, then you still need to understand both (or all three), but new coders might be well advised to start with smart match.
评论 #2834850 未加载
评论 #2834350 未加载
ChuckMcM将近 14 年前
Nice concise writeup. The only important thing he missed as far as I can see is that the '..' operation can create anonymous arrays of sequences of characters too so 'a' .. 'z' gives you an array of all the letters between 'a' and 'z'.
评论 #2834572 未加载
pitchups将近 14 年前
Wish there were similar ones for all the other languages - PHP / Python etc. I always thought that most programmers and web developers experienced in one language can quickly pick up the major features of another lanaguage, if there was a quick overview of this sort. Know of any sites that do this? Maybe this is a great opportunity for someone to put together a site like that?
评论 #2834045 未加载
评论 #2834033 未加载
ez77将近 14 年前
As an aside, the author's clarification [1] of the many terms related to the UK, Britain, etc. are very enlightening.<p>[1] <a href="http://qntm.org/uk" rel="nofollow">http://qntm.org/uk</a>
known将近 14 年前
<a href="http://perldesignpatterns.com/?PerlDesignPatterns" rel="nofollow">http://perldesignpatterns.com/?PerlDesignPatterns</a>
d2将近 14 年前
Sam, you've certainly made an enemy out of every member of the Perl community with this sarcastic and incomplete post.<p>Once you've gotten through OReilly's beginner Perl books and "Programming Perl", if you truly want to learn how to scale Perl in the enterprise, read Damian Conway's Object Oriented Perl. Once you can write solid consistent OO Perl, read "Apache modules with Perl and C".
评论 #2834845 未加载
评论 #2834480 未加载
评论 #2835065 未加载
评论 #2834614 未加载
评论 #2834615 未加载
doctoboggan将近 14 年前
Would it be beneficial to know this alongside of Python, or is it more used instead of Python?
评论 #2833976 未加载
评论 #2834076 未加载
评论 #2835697 未加载
评论 #2833841 未加载
评论 #2834497 未加载
评论 #2833991 未加载
lelele将近 14 年前
It is not what Perl you know that will hurt you, but what you don't know.
vrode将近 14 年前
I hope that the first thing you learn is how to pry open a casket.
unshift将近 14 年前
not mentioned in the article is that apparently Moose is a really good OO system for perl, but (in my opinion) about 10 years too late.
评论 #2833949 未加载
评论 #2833888 未加载
评论 #2833858 未加载
chaostheory将近 14 年前
Question: Why don't people transition to Perl 6?
评论 #2835458 未加载
评论 #2834929 未加载
评论 #2835062 未加载
评论 #2835176 未加载
kaichanvong将近 14 年前
OH: "I dont believe it is possible."
qusiba将近 14 年前
Studied Perl before Python years ago. Never got a chance to actually use it, whereas Python became one of my favorite languages.
creativityhurts将近 14 年前
But why?
berserkpi将近 14 年前
Sure, just in case you really want to learn Perl...
derrickpetzold将近 14 年前
Oh my why would anyone want to lean Perl anymore? Unless you are working with a legacy codebase learn Python, Ruby, Java, C#, Erlang, Scala, Haskell... in other words run the f away from Perl if you can unless you are into S&#38;M.
评论 #2835245 未加载
评论 #2835630 未加载