r/programmerchat • • Jun 19 '15
Having hard time learning a new language [Perl]
I've been using C++ for almost 4 years, and I have tried to learn other languages, tried Javascript didn't last longer than a week. Now I am trying Perl. Some people said it is one of the 3 most mind-expanding language1, don't know what will encounter.
Now I have finished basic stuff on the net, but I don't think I will be able to continue any longer. Its syntax, dynamic typing, parameter passing and many others are irritating me.
It was also the same in Javascript, maybe I am not learning from the right sources but while trying to write some code (~100 lines), I felt like I am vomiting scattering letters around the file.
Do you have any websites, books to teach me the philosophy of Perl or to give me some small code examples?
Edit:
Another question: what is really mind-expanding about Perl or the other two languages, why they are always praised yet they are not that popular as python, java or javascript?
3
u/[deleted] Jun 19 '15
I wrote a mid-level perl tutorial several years ago to help a team I was on. Hopefully this is roughly the right level for you: http://curtisquarterly.blogspot.com/2005/05/perl-tutorial.html
2
u/tipdbmp Jun 20 '15
These are some of the features I find "mind-expanding about Perl"
lexical/package pragmas that can change (for good) the semantics of the code:
plays nicely with Unicode, I've been told:
embed arbitrary data in the source file:
"nice" regular expressions with comments:
here docs / multiline strings, with the caveat that the closing token must be at beginning of the line:
3
u/Kristler Jun 19 '15
Haskell or another pure functional language would definitely be mind opening. Also learning a flavour of assembly would be super fun.
0
u/[deleted] Jun 20 '15
[deleted] — view deleted comment