Perl Programming

CSE3395




Lecture 1 Introduction

1 comments

David Abramson
Perl Programming.

Class of langs that have become very popular because of the internet.

It's a scripting language. You can get a lot done, simply. Making easy things easy, and hard things possible.

Lectures Are Online.

Perl is
Swiss army chain-saw of programming.
It can become cryptic
Partially compiled, partially interpreted. (You can detect syntax errors etc. earlier.
You should be able to rapidly prototype a perl program, knock one up quickly.
You're not meant to create large systems in perl.
Typing in perl is flexible

The language is designed around extracting info from bodies of txt, and printing reports on those text files.

It's a good language for many system management tasks.

Tends to be practical, rather than beautiful.


Strengths are that it's simple, practical, portable, extensible (libs, links to other langs), robust and free (as in speech and beer)

You could use perl where you don't want to use something like C. You might want to knock up something quick and chuck it away.
Too small to bother with C
too complex for the shell.
Your program might be in continuous development.
Wide distribution
Apache web server compatible.

Why NOT use Perl?
If you crave clarity of code.
There's a lot more functionality packed in.
C is about 20% faster
You wouldn't use it for a large scale project.


CPAN
http://www.perl.com/CPAN
Comprehensive Perl Archive Network

Lecture Specific information on the courseware page.
Unit's newsgroup
Worldwide newsgroup comp.lang.perl.misc (Usenet)
man perl
perldoc


Texts
Could find everything you want to know online.
If you want to buy some texts...

"Learning Perl" (Llama Book)
"Programming Perl" (Camel Book)
The little book is good for beginners.
The second editions are still relevant

Only 13 lectures
Two assignments (10%)
Final exam (80%) (3 Hours, previously practical, but this year more conventional)

--

Topics Covered

Scalar values and variables

Need to become quite proficient with regular expressions.

Take heed of the green slides! They're 3rd year ones.

Perl is like C and Java. { block }
Required with if and while { }
words are case sensitive
Comments with #
Parentheses on function calls are optional()
no need to pre-declare variables.
Often, when you have a bug, look carefully for misspelled variables.

Today has just been a helicopter view of what Perl is like.
Ruby?


Last posts

Archives

Links