katch has asked for the wisdom of the Perl Monks concerning the following question:
|
---|
Replies are listed 'Best First'. | |
---|---|
•Re: Learning Perl?
by merlyn (Sage) on Sep 05, 2003 at 19:34 UTC | |
And I still have a lot to learn. -- Randal L. Schwartz, Perl hacker
| [reply] |
by Notromda (Pilgrim) on Sep 05, 2003 at 21:52 UTC | |
| [reply] |
by thinker (Parson) on Sep 06, 2003 at 11:53 UTC | |
So it's that easy!? | [reply] |
by Anonymous Monk on Sep 06, 2003 at 04:22 UTC | |
| [reply] |
by Anonymous Monk on Sep 06, 2003 at 01:46 UTC | |
| [reply] |
Re: Learning Perl?
by BrowserUk (Patriarch) on Sep 05, 2003 at 20:15 UTC | |
The first question: Is this your first programming language? Have fun and good luck! Examine what is said, not who speaks.
"Efficiency is intelligent laziness." -David Dunham"When I'm working on a problem, I never think about beauty. I think only how to solve the problem. But when I have finished, if the solution is not beautiful, I know it is wrong." -Richard Buckminster Fuller If I understand your problem, I can solve it! Of course, the same can be said for you. | [reply] |
Re: Learning Perl?
by jdtoronto (Prior) on Sep 05, 2003 at 19:32 UTC | |
Look around the monastery! It is possibly the best Perl education you will find. Have Learning Perl very close by. Get copies of 'Effective Perl Programming' (Hall & Schwartz) and 'Perl Cookbook' (Christiansen & Torkington) also by O'Reilly. Sit down with a large mug of coffee or whatever, and start on something! Use the search ans SuperSearch functions here in the monastery, in particular look in the Tutorials, Code and Meditations sections. They are an absolute Gold Mine of good stuff. I spent years programming Perl working mainly fro other peoples examples and just about ANY Perl book I could find, then I found this place. I have learned more here in a few short months just by reading, let alone what I have learned form asking questions! Good Luck | [reply] |
Re: Learning Perl?
by ChrisR (Hermit) on Sep 05, 2003 at 19:38 UTC | |
1) read a lot 2) code a little 3) test a lot 4) repeat There are many other resources to help you other than books, although it's hard to beat some of the O'Reilly books like "Programming Perl", "CGI Programming with Perl", "Advanced Perl Programming", "Perl Cookbook", "Programming the Perl DBI", etc. There is also an excellent book by Lincoln Stein called "Network Programming with Perl". Other resources may include www.PerlMonks.org, of course, www.perldoc.com, learn.perl.org and Google. Good luck and remember "There's more than one way to do it." There's another good book I forgot to mention. It has nothing to do with Perl but everything to do with programming (even though it wasn't written for that purpose). It's called "A Whack on the Side of the Head" by Roger Von Oech. This book will help you unlock the mind for innovation and push you in the right direction for developing logical algorithms It goes right along with the idea of "There's more than one way to do it". | [reply] |
Re: Learning Perl?
by bradcathey (Prior) on Sep 05, 2003 at 22:08 UTC | |
Having said that, I did read Learning Perl, but now I reading it again! I have and use Programming Perl, but that, for me, is like reading the Bible in the original languages. Just ordered the Perl Cookbook and looking forward that. Also, keep a copy of Perl Pocket Reference handy. Also recommend you read the fantastic tutorial on reg exp on PerlDoc by Mark Kvale (my printout is in tatters). And, of course, snoop around the Monastery reading tutorials, monk's scratch pads, etc. Watch out for books like Perl and CGI by Castro (apologies to Elizabeth and fans). They can help you get started quickly, and serve as quick reminders, but they really don't teach you how to write great code. That's my view from towards the bottom looking upwards. Oh, to be able to understand even half of what I see here. | [reply] |
Re: Learning Perl?
by naChoZ (Curate) on Sep 05, 2003 at 19:51 UTC | |
Don't forget woolfy's post of high repute, Where and how to start learning Perl. Very good place to start.
-- | [reply] |
by woolfy (Chaplain) on Sep 06, 2003 at 07:50 UTC | |
Following the links in Where and how... is just what I am doing now and it helps me quite a bit. By now I can take a look at (new) nodes in japhs, Snippets Section, Code Catacombs and Craft and see if I understand them. If I don't, I take my links and books until I get a grasp (or more). When I learned Perl the first time, I had to make scripts to read logs, to handle forms, to send emails, to access a database (mmm, what did we start with, mSQL?), to keep and show statistics. Difficult but fun. Having a goal helps a lot. For me, at the moment one of my main goals is to build a web shop, user and product database, moderated discussion forum ad so on. Not by just take the "easy" road right away and take one of the many modules and examples that are around, because now I can't distinguish between rubbish and pearly bits, so maybe later. I've got no questions yet for Seekers of Perl Wisdom, but there's a lot to learn there too. Answers to most questions I could ask can be found there, after searching just a tiny while. By the way, that's often the right answer to questions that are asked here. Search and find and read and learn and experiment. Search first, ask later. | [reply] |
by naChoZ (Curate) on Sep 06, 2003 at 18:26 UTC | |
All too true. I'm the same way, I need a goal, some sort of project to motivate me. Currently, mainemenu.com is my pet project. I started it as a project to learn some php, but I got my fill of that pretty quickly and am converting over to perl now. So far I've figured out the goodness of HTML::Template and I'm beginning to get a handle on Class::DBI. Perhaps you could apply some of useful tidbits from this thread to your post. Especially since, as of this writing, the vote is 5/54/0 in favor of moving it to a more permanent section of the monastary.
-- | [reply] |
Re: Learning Perl?
by Steve_p (Priest) on Sep 06, 2003 at 02:00 UTC | |
From my experience, the best programmers are almost completely self-taught, so welcome to a difficult, but highly rewarding path. Overall, the best way to learn how to program is to program. I think the choice of Learning Perl is a good one for learning Perl, but, no offence to Merlyn, its not one of the best for learning to program. Of course, I don't believe that was its purpose. This topic has come up a few times, so rather than repeat myself, check out what I have to say there. I would add one new book to that list. After going through How to Design Programms (it's free online), I'd suggest going through a newer book called Understanding Unix/Linux Programming: A Guide to Theory and Practice. All I could say about this book when reading it was, "Wow!" I learned a lot from it and truly wish I had it when I was much younger. | [reply] |
by merlyn (Sage) on Sep 06, 2003 at 05:40 UTC | |
... Learning Perl is a good one for learning Perl, but, no offence to Merlyn, its not one of the best for learning to programThat's completely correct. I didn't write Learning Perl to learn to program, although people have used it for that. I wrote it for programmers to learn to program in Perl. If you don't know what an array or a subroutine is, you probably will get lost from time to time in the Llama. I learned to program when I was 8. That's too long ago for me to remember what I was doing to learn, so I really can't write about it or teach it. All I can do is write about what I have recently learned, like Perl. -- Randal L. Schwartz, Perl hacker
| [reply] |
Re: Learning Perl?
by phydeauxarff (Priest) on Sep 05, 2003 at 19:35 UTC | |
There's How did you learn Perl? and Learning Perl (re: Your first Perl Book)
plus many, many more examples you could find by searching...just dive in and read, read, read (supersearch is your friend) and then find something you want to do and start writing some code...make mistakes....ask questions...and most of all, enjoy! Oh and of course....I would be remiss if I didn't suggest you check out merlyn's articles ;-) | [reply] |
Re: Learning Perl?
by gwadej (Chaplain) on Sep 06, 2003 at 02:43 UTC | |
Most of my best answers have already been covered. But if you are forced to work in a MS Windows environment, you might prefer Learning Perl on Win32 Systems (the Gecko Book). It is mostly equivalent to Learning Perl with most of the Unix-isms replaced with Win32-isms. I know several people that had no Unix background that found the Gecko book easier to learn from than the other. I can't say which is better to learn from because I learned Perl from the Camel Book (1st edition). As for learning programming languages in general, I find that learning the syntax takes a relatively small amount of time. Learning to write Perl code in Perl (as opposed to writing something else in Perl) requires time and experience. Some of that experience must be gained through writing code. But one of the best ways to gain that experience (without making all of the mistakes yourself <grin/>) is to read as much good code as you can get your hands on. Then read as much bad code as you can get your hands on. Once you understand the difference, you will find that you can write code in a way that works with the language, not against it. G. Wade | [reply] |
by merlyn (Sage) on Sep 06, 2003 at 05:38 UTC | |
-- Randal L. Schwartz, Perl hacker
| [reply] |
by gwadej (Chaplain) on Sep 06, 2003 at 14:32 UTC | |
Oh terrific! Just what I need! Now I'm going to have to get the new version as well.<grin/> I've gotten both of the previous editions to make certain I know what I'm talking about when someone asks about a good book for learning Perl. Now I'll need to upgrade my books.<sigh/> G. Wade | [reply] |
by Arbogast (Monk) on Sep 06, 2003 at 03:35 UTC | |
Grabbed the Learning Perl, Programming Perl, Perl Cookbook (the most helpful IMO), Perl/TK and then a bunch more (mostly OReilly) books. Bought a bunch of computer parts and figured out how to make Linux work. I read all kinds of MAN stuff in the Bash Shell in Linux. There are alot of answers there. Used Google a gazillion times. Just kept writing code until it all worked, then have kept improving it. Year and a half later, I gotta say I am astounded by Perl, and had no clue what a cool thing I was learning. | [reply] |
Re: Learning Perl?
by BrentDax (Hermit) on Sep 06, 2003 at 08:35 UTC | |
From there, I bought Learning Perl (Second Edition--that's what they had at the time) and read it on a cruise. Yes, I learned it without having a computer handy. I eventually got Camel II (III hadn't come out yet) and read it. I spent a year or two hacking Perl for CGI before I started doing serious work with it. I don't really remember how I found PM, but it proved to be an excellent resource, and for a fairly long period was the site I spent most of my time on. I eventually made an effort to get involved in the Perl 6 development work, and wormed my way into a position of some significance. I also tried to learn about Perl 5 internals by hacking on Perl 5. Suffice it to say, that project is still in progress... Even today, though, I still don't know the whole language. pack() and unpack() are mysteries to me (my Perl Geek Code says that I pack and unpack my suitcase), and I'm still constantly looking up all sorts of nonsense in the docs. I've never used most of the system-specific stuff, like getpwnam(). The list goes on... =cut | [reply] |
Re: Learning Perl?
by Popcorn Dave (Abbot) on Sep 06, 2003 at 06:05 UTC | |
There is no emoticon for what I'm feeling now. | [reply] |
Re: Learning Perl?
by WhiteBird (Hermit) on Sep 06, 2003 at 00:00 UTC | |
| [reply] |
Re: Learning Perl?
by thelenm (Vicar) on Sep 06, 2003 at 05:12 UTC | |
I learned Perl by forcing myself to use it. I have to get my hands dirty if I'm ever going to remember how to do something. Every time I wanted to write a shell script or C++ program to do something, I forced myself to do it in Perl instead. If I didn't know how to do something, I searched the perldocs and the Web until I figured out how to do it. After a few months of this, I had become comfortable enough with Perl that it became my first tool of choice for lots of tasks where I formerly would have used something else. So my advice is: force yourself to use it, every day, and take the time and effort not to let yourself slip back into whatever else you may be comfortable using. -- Mike -- | [reply] |
Re: Learning Perl?
by kiat (Vicar) on Sep 06, 2003 at 08:19 UTC | |
At the beginning stage, it's a bit like a child learning to speak. The child has limited vocabulary and mastery of the grammar but yet succeeds in conveying his ideas. He'll makes mistakes (over-generation, for example, when he says things that "I eated" instead of "I ate") but overtime, he'll make corrections and become more proficient in the language. He can do that because of constant interaction with the language. I think learning to program is the same. You start by writing simple programs using whatever knowledge of perl you know at the initial stage. As you become more familiar with the language, you'll discover better ways of coding which had previously not occurred to you. You can hasten that learning process not just by coding more, but by reading books and other people's code. | [reply] |
Re: Learning Perl?
by Anonymous Monk on Sep 06, 2003 at 05:17 UTC | |
1) The source code of a program line by line - with explanation. 2) The output of the program after its been executed, line by line - with explanation. You could actually read this book and learn without even being near an editor, Perl interpreter, or a computer for that matter. I have given away several copies of the first edition, and picked up the latest edition as a helper/reference for the office. | [reply] |
Re: Learning Perl?
by davido (Cardinal) on Sep 06, 2003 at 19:04 UTC | |
What I feel is probably the most important philosophy behind learning anything, Perl included, is keeping an open mind. This is the notion of teachability. The chances are strong that if someone explains a 'best way' to do something in Perl, and you disagree, with much less experience than the 'expert', you probably are not fully comprehending the whole problem. Stay open to proven methods. Just because it's cool to be different in High School doesn't make the herd always wrong. That isn't to say that fresh ideas can't lead to innovation. It simply means that there is usually no need to invent a round thingy with a tire on it and a hub in the center, when a wheel already exists. The existing wheel may be improved upon and better tailored for your situation, but you may as well start with the wheels that you find in the store first, so you can fully understand in what ways it needs to be adapted to your situation. There's no need to go through the steps of developing a log, and then a skid, and then a sled, and then a sled with runners, and finally realize that the whole contraption is incapable of travelling at 80mph because of friction, and that wheels would have been better all along, just like everyone's been saying. Of course early explorers had to kick against the pricks to discover new horizons beyond the ends of the earth. But they first became experts in navigation, and learned firsthand exactly why traditions were wrong. Don't expect to be the expert who knows best until you understand why everyone else thinks the way they do. Early explorers understood that people believed the world was flat, and that it had ends, because they understood that in fact, its roundness gave the impression of an end called the horizon. And in understanding that, they found new horizons. You too may discover new horizons, but you must first understand what a horizon is. Now I can explain how I have engaged in my effort to learn Perl. I am still engaged in that effort, as long as Perl remains a topic of interest and efficient tool of implement, I will continue to learn, so long as I continue with an effort to hone my skill. There is no end to the process of gaining wisdom, just as there is no end to what we now understand to be the Universe (well, ok, maybe there is, but we'll never get there).
Sorry to have become so long winded, but my point to all this is that you can apply the same principles to learning Perl that you apply to learning any other broad, intricate subject. And most of all, don't give up.
Dave "If I had my life to do over again, I'd be a plumber." -- Albert Einstein | [reply] |
Re: Learning Perl?
by Drgan (Beadle) on Sep 06, 2003 at 11:14 UTC | |
There is no other way to learn. Definitely read Learning Perl 3rd Edition. "I have said, Ye [are] gods; and all of you [are] children of the most High." - Psalms 82:6 | [reply] [d/l] |
Re: Learning Perl?
by Louis_Wu (Chaplain) on Sep 07, 2003 at 07:20 UTC | |
This question has been asked before, and I answered it once. I included a small list of tutorials and guidelines, and some instructions on how to search for more. Give it a peak. When you're done with the Llama, you'll probably be wanting to get into bigger programming, modules, OO, etc. Check out merlyn's Learning Perl Objects, References & Modules - the Alpaca. I just brought it home, and I expect to spend many profitable hours with it and my powerbook. Perl programming and scheduling in the corporate world, as explained by dragonchild: "Uhh ... that'll take me three weeks, broken down as follows: 1 day for coding, the rest for meetings to explain why I only need 1 day for coding." | [reply] |
Re: Learning Perl?
by Anonymous Monk on Sep 06, 2003 at 12:49 UTC | |
| [reply] |
Re: Learning Perl?
by Roger (Parson) on Sep 06, 2003 at 13:46 UTC | |
| [reply] |
Re: Learning Perl?
by katch (Acolyte) on Sep 06, 2003 at 19:01 UTC | |
| [reply] |
Re: Learning Perl?
by data64 (Chaplain) on Sep 06, 2003 at 22:50 UTC | |
I learned Perl from a combination of the Learning Perl book and writting short utility programs. Just a tongue-tied, twisted, earth-bound misfit. -- Pink Floyd | [reply] |
Re: Learning Perl?
by smalhotra (Scribe) on Sep 09, 2003 at 22:56 UTC | |
$will->code for @food or $$; | [reply] [d/l] |
Re: Learning Perl?
by Overthruster (Initiate) on Sep 09, 2003 at 23:49 UTC | |
| [reply] |
Re: Learning Perl?
by phax (Initiate) on Sep 10, 2003 at 05:07 UTC | |
| [reply] |