PDA

View Full Version : Programming Perl 3rd.


recluse
05-22-2002, 04:08 PM
As I've been reading through this book, now on Chpt 4, I began to wonder.... this bottom up approach can get quite confusing at times and I'm wonder if it's all going to come together at one point. Have any of you read this book straight through w/little or no Perl knowledge? Or do you think it's going to be one of those things where I'll read it all, go 'mm hmm' and read it again and be "OH WOW'?

Bradmont
05-22-2002, 05:43 PM
I haven't read straight through it, though it was one of the textbooks for my unix class, and we went through the whole book straight in 2 or 3 weeks. Don't bother with every last detail, just get the jist of it, and when you need something specific, look it up.

phubuh
05-25-2002, 06:44 PM
I suggest you read "Learning Perl" before the Camel book if you haven't programmed much before.

iDxMan
05-25-2002, 06:51 PM
No, it'll probably just grow on you like green mold after reading more and using it for something in the real world.

Read some, try some examples, then try to solve something with perl. Perhaps check out the coding challenge forum and work on one.

inkedmn
05-25-2002, 06:55 PM
one thing i did that helped me learn was to look through other examples at www.codeexamples.org (in different languages) and try to translate them into perl/whatever language you're wanting to learn.

that helped me alot.

and, i agree, learning perl is very good for the beginner.

Bradmont
05-25-2002, 07:38 PM
Originally posted by Bradmont
I haven't read straight through it, though it was one of the textbooks for my unix class, and we went through the whole book straight in 2 or 3 weeks. Don't bother with every last detail, just get the jist of it, and when you need something specific, look it up. whoops, my bad, we used learning perl -- must've misread... :o

Strike
05-25-2002, 09:03 PM
Even so, I'd say Bradmont's advice applies to the Camel as well. I only read (past tense) through it when I wanted to know about language specifics. Otherwise I used it as a reference alone.

recluse
05-28-2002, 03:17 AM
Dang Bradmont I dropped my jaw when I read your first response.... yah a tid bit diff between the two.

Bradmont
05-28-2002, 04:00 AM
Originally posted by recluse
Dang Bradmont I dropped my jaw when I read your first response.... yah a tid bit diff between the two.
hehe -- my instructor was just that good

Rox
08-09-2002, 01:17 PM
I'm just now started to learn everything else besides HTML. I already know HTML and I want to learn more. I am starting off by reading Learning Perl/Tk by Nancy Walsh, it is the series of books that has animals on it, this particular one has an ostrich on it. Anyone can give me any tips on starting out, such as what not to do, or any other helpful tips would be greatly appreciated. I got this book b/c it was on sale, but if you guys suggest a different one I will go check that one out and see if I should buy it.

Also reading on Javascript, which one do you suggest I learn first, Javascript or Perl, or something else? Does it matter?

Thanks!

inkedmn
08-09-2002, 05:04 PM
python :)

http://www.python.org

stray not to the dark side, young jedi :)

l2kashe
08-21-2002, 03:39 PM
Perl is a nice language in my opinion... Yes I understand its not everything. Its not meant to be.

Programming in general follows a few basic principles.

You have declarations:
Something equals something else
foo = blah
OR
foo = blah + baz

Conditions :
Testing something against something else will return a value of some sort

if (this) {
do this
} else {
do that
}

Within conditionals there is alot of difference in implementations between languages...
C == if / else
perl == if/elsif/else
Java == try/throw/catch <- someone please correct me if im wrong here

Just to higlight a few

Loops :
if some condition is met, or until some condition is met, do this over and over

Again there is a lot of difference between languages, Ill illustrate for and foreach

for (variable = something; conditional test here; increment or decrement variable)

I.e
for (i = 0; i <= 20; i++) {
do_this
}

would loop 21 times (remeber the 0 loop)

foreach i (some_list) {
do_that
}

where some_list is predefined in some way, and you get one element from it in each loop

And that is all there is to programing...

The differentiation between a programming/scripting language and a Markup Language, is markups dont have loops. (Im not a web developer, I stay away from the enduser as much as possible, but I also dont think they have variables..)

And now you ask .. What does this have to do with the thread?

Perl is a nice language to learn from. Once you understand what you are doing, its mostly syntax (typing this instead of that)...

Perl is also nice in that it allows for flexibility migrating from top down to Object Oriented programming.

It also has alot of nice features in terms of stuffing data together in creative ways. Implementing complex data structures as an example.

Also when all else fails you can make direct calls to C functions defined on your system.

Personally I found reading the llama (Learning Perl, O'reilly press) to be great. I skipped Chapter 1 (Stroll through Perl) and started in chapter 2. Once that was completed I was creating complex programs at least at the system level. With the addition of the Camel, Panther, and Ram books (Programming Perl, Advanced Perl Programming and, Perl Cookbook respectively) I can get jsut about anything I want to do done in Perl.

Due to perl's nature there are many ways to skin the same cat. I have found it most usefull to pick a particular style of coding and stick to it. This helps me read the code I wrote previously. I also comment my code well, which again leads to better code reuse on my part.

Perl is a great language to learn with. Sometimes it makes you jump through flaming hoops to get where you want to go, but you can. Just dont try to make Perl yoru hammer and convert everything else to a nail and you shoudl be good to go..

(Please no flames, yes Ive looked at Python, no I havent used it yet. Yes in understand the technical differences, No I dont presently like the indentation preference in my source code. Could my mind change in the future yes, Will I listen if you rant about language X is better, probably not unless you can give concrete examples within context)

Strike
08-22-2002, 06:51 AM
Originally posted by l2kashe
Perl is a nice language in my opinion... Yes I understand its not everything. Its not meant to be.
Funny, most perl fanatics think it is :)

Conditions :
Testing something against something else will return a value of some sort

if (this) {
do this
} else {
do that
}

Within conditionals there is alot of difference in implementations between languages...
C == if / else
perl == if/elsif/else
Java == try/throw/catch <- someone please correct me if im wrong here

You are wrong there :) try, throw, and catch deal with exceptions, which are different from simple conditions. Java has if/else as well.

Due to perl's nature there are many ways to skin the same cat. I have found it most usefull to pick a particular style of coding and stick to it. This helps me read the code I wrote previously. I also comment my code well, which again leads to better code reuse on my part.

Perl is a great language to learn with. Sometimes it makes you jump through flaming hoops to get where you want to go, but you can. Just dont try to make Perl yoru hammer and convert everything else to a nail and you shoudl be good to go..

(Please no flames, yes Ive looked at Python, no I havent used it yet. Yes in understand the technical differences, No I dont presently like the indentation preference in my source code. Could my mind change in the future yes, Will I listen if you rant about language X is better, probably not unless you can give concrete examples within context)
Okay, trying to avoid any fanaticism as this really isn't the place, but since you mentioned Python I feel compelled :P The first paragraph of this quote indicates to me that you would like Python because it is consistent where Perl is not.

unruly
08-22-2002, 12:44 PM
python. for when the uncreative feel the need to program.

:D