« Lost Boy Scout found in Utah wilderness | Main | Coolest remote-control toy ever »

June 22, 2005

Learning Perl

I decided to lear Perl. I'm tired of staring at Perl scripts and wondering what they do. Larry Wall, the NASA rocket scientist that invented this cryptic language, should be carted off to Gitmo to have bamboo shoots driven under his fingernails. But, be that as it may, I've resigned myself to learn it. So far, I like this Perl tutorial. It's for beginners and that's what I'm after at this point. A simple introduction to a lanugage no sane person would use.

Here's an example of how obtuse the code is. I've been programming for 20 years in BASIC,COBOL,SQR,SQL,SQL,and PeopleCode. I've done some programming in Assembly Langunage(ALC) on a 6809 microprocessor. I took ForTran and Pascal in college. I've NEVER seen anything as bad as this:

In this command, the \n is a carriage return. (Yikes)

print "Hi there!\n";

You can also use special operators like ++, --, +=, -=, /= and *=. These manipulate a scalar's value without needing two elements in an equation. This is incomprehensible gibberish. I've never seen anything remotely like it before. Code should be easy to read and understand, not something you need a Rosetta Stone to decipher.

$a = 5;
$a++; # $a is now 6; we added 1 to it.
$a += 10; # Now it's 16; we added 10.
$a /= 2; # And divided it by 2, so it's 8.


Perl is a horrible, twisted language, tackled with gusto by legions of geeks in the small hours of the morning. It creates absurd, surreal error messages like:

"Unmatched right curly bracket at quiz.pl line 251, at end of line"

Technorati tags:
Delicious tags:

Folksonomy:These icons link to social bookmarking sites where readers can share web pages.
 
digg  Furl  Spurl  Reddit  blinkbits  BlinkList  blogmarks  connotea  De.lirio.us  Fark  feedmelinks  LinkaGoGo  Ma.gnolia  NewsVine  Netvouz  RawSugar  scuttle  Shadows  Simpy  Smarking  TailRank  Wists  YahooMyWeb

Posted by Peenie Wallie on June 22, 2005 at 07:03 PM

Comments

You should check out all the resources at http://learn.perl.org/

In particular, my books "Learning Perl" and "Learning Perl Objects References and Modules" are good introductions, and can be read more quickly if you already are familiar, but at least should be read even if you're an expert!

Posted by: Randal L. Schwartz on June 23, 2005 at 05:24 PM

Thanks for the note. I'll check them out.

Posted by: Peenie Wallie on June 24, 2005 at 09:16 AM

If you've never seen anything that bad, you haven't programmed that much. There are some languages which which you can't even use a common keyboard.

None of the features you point out, however, are special to Perl.

Since you're just started out (or were when you posted this), realize that any new thing is going to seem odd. Don't be too quick to project your feelings onto the language.

Good luck!

Posted by: brian d foy on April 12, 2006 at 09:57 AM

Oh, I've done plenty of programming. Don't you worry about me there, Sparky. I was programming in BASIC when you were still in diapers. I bought my first computer 24 years ago, and I have programmed in BASIC, C, Pascal, Fortran, Assembly Language, COBOL, SQL, SQR, HTML, XML, Perl, PHP, Crystal, Access, PeopleCode, App Engine, Component Interface, and then some. So, don't you worry about me. Having said that, none of these other languages offer the shortcuts that I've seen in Perl, and it is nearly indecipherable. However, I'll give you that any language can be hard to read if you don't know it. ;)

Posted by: Peenie Wallie on April 12, 2006 at 04:16 PM

Post a comment




Remember Me?

(you may use HTML tags for style)