2 ms·
Ok, just as a disclaimer: i recently read Larry Wall's post on perl design principles +natural language and am reconsidering perl.. But honestly all my previou
by aangjie 15y ago
Ok, just as a disclaimer: i recently read Larry Wall's post on perl design principles +natural language and am reconsidering perl..
But honestly all my previous experience poking around with perl have been horrible... it's pretty messed up syntax to read... i guess it may not be so hard for a perl expert..
- chromatic 15y agoMost Perl tutorials do a terrible job of explaining the two or three things you really need to understand to learn Perl syntax. I wrote Modern Perl to rectify that: http://onyxneon.com/books/modern_perl/ http://onyxneon.com/books/modern_perl/
- tete 15y agoPerl really has a problem here. Most people don't learn Perl as their first language. Perl is very flexible (There Is More Than One Way To Do It). I often come across code where I can see that this from C programmer. Especially when reading documentation of language bindings, which often are from C programmers. Of course you could replace C with any other language, but really, one can use Perl in various ways. This is awesome when you know how to use it and can create short and readable code, like when you want to describe something in a natural language and when you really understand something you can make it easy. In fact Perl is heavily inspired by natural languages. Larry is a linguist. So there are two ways. Either read the Modern Perl book, which indeed is awesome. It's better than any other Perl book/tutorial and really, there are ones that really suck. What's awesome about it is so good while there is a free version available. In fact the source code can be found on GitHub. It's really nice, because you will actually know how to do things, not just what the language is like. You will be ready to start your first project. It's also really nice, because it's written in a way that neither bores people who know how to program nor makes it impossible for someone who never programmed to understand it, even though it's probably pretty hard if you have no idea about programming at all. An alternative is looking for stuff on CPAN or GitHub. I actually think that's often a better approach (at least it is for me). Learning to code by seeing actual code and having a reference. It's just kinda hard to grasp things. Another approach is of course programming something and looking up how it is done. In this case it's maybe a good idea to look out for best practices. Oh this is something else that's nice about Perl, but beginners sometimes don't know about. use strict; # Well, everyone should use that use warnings; # For more semantic errors use diagnostics; # For explaining errors/warnings in plain Enlgish use Perl::Critic; # That's a CPAN module that tells you what probably isn't a good thing to do And then there is an awesome community, called Perl Monks, which maybe is a bit like what Stackoverflow is these days, but way older. Anyway, all of this is covered in the Modern Perl Book. So go for that book if you want to get into Perl (again). Also, Perl folks are usually not too angry about other languages. This is also a great thing. They actually talk about problems and fix them instead of being dogmatic. Perl developers usually just want to get stuff done. If you can't do something easily in Perl itself, then you will usually find a solution on CPAN (see Moose for -very- advanced OOP). I would like to see a lot of these things in other communities, but a lot of what makes Perl so awesome is that it isn't the new thing, but stuff that already had a lot of evolution going on. Sometimes you don't want that, but Perl folks usually are friendly towards other languages. Well, besides PHP, but that's more a cultural things. Perl culture alone is a reason for me to stick with it. It makes boring things more fun. In other words: Give it a serious try. If you don't like it you can still go to another language and have probably learned a lot.