Perl Introduction (OLD - NEARLY OBSOLETE)

26
Version 1.2.0 © Adam Trickett September-2007 Distributed under a creative commons Attribution-NonCommercial-ShareAlike licence. 1 Perl Perl The The Friendly Friendly Programming Language. Programming Language. A short talk to introduce the Perl A short talk to introduce the Perl programming language and it's programming language and it's culture culture . .

description

An introduction to Perl, the friendly programming language.

Transcript of Perl Introduction (OLD - NEARLY OBSOLETE)

Page 1: Perl Introduction (OLD - NEARLY OBSOLETE)

Version 1.2.0 © Adam Trickett September-2007 Distributed under a creative commons Attribution-NonCommercial-ShareAlike licence.

1

PerlPerlThe The FriendlyFriendly Programming Language. Programming Language.

A short talk to introduce the Perl A short talk to introduce the Perl programming language and it's programming language and it's cultureculture..

Page 2: Perl Introduction (OLD - NEARLY OBSOLETE)

Version 1.2.0 © Adam Trickett September-2007 Distributed under a creative commons Attribution-NonCommercial-ShareAlike licence.

2

HistoryHistory

● Perl is a programming language created by Larry Wall on 18 December 1987

● Perl 5 released on 17 October 1994● Perl 5.8.8 released 2 February 2006● Perl 5.10.0 really soon now...● Perl 6 still to be released...

Page 3: Perl Introduction (OLD - NEARLY OBSOLETE)

Version 1.2.0 © Adam Trickett September-2007 Distributed under a creative commons Attribution-NonCommercial-ShareAlike licence.

3

Perl's ParentsPerl's Parents

● Perl is a language that unashamedly takes ideas from other languages

● awk/nawk● sed● shell● c● Lisp

Page 4: Perl Introduction (OLD - NEARLY OBSOLETE)

Version 1.2.0 © Adam Trickett September-2007 Distributed under a creative commons Attribution-NonCommercial-ShareAlike licence.

4

Compiled or Interpreted?Compiled or Interpreted?

● Perl source code is compiled very quickly into a syntax tree

● The syntax tree is automatically optimised● Finally the optimised syntax tree is executed

● Perl is compiled and interpreted just like other modern languages such as Java.

Page 5: Perl Introduction (OLD - NEARLY OBSOLETE)

Version 1.2.0 © Adam Trickett September-2007 Distributed under a creative commons Attribution-NonCommercial-ShareAlike licence.

5

““hard tasks easy and seriouslyhard tasks easy and seriouslynon-trivial tasks possible”non-trivial tasks possible”

● Perl is designed to make life easy for the programmer

● Autovivication of variables● Dynamic typing● Automatic memory management● Hashes● Procedural, object-oriented or both● Many, many built-in convenience features

Page 6: Perl Introduction (OLD - NEARLY OBSOLETE)

Version 1.2.0 © Adam Trickett September-2007 Distributed under a creative commons Attribution-NonCommercial-ShareAlike licence.

6

Hello WorldHello World

print 'Hello World'

Page 7: Perl Introduction (OLD - NEARLY OBSOLETE)

Version 1.2.0 © Adam Trickett September-2007 Distributed under a creative commons Attribution-NonCommercial-ShareAlike licence.

7

Hello World MK-2Hello World MK-2

#!/usr/bin/perl

use strict;

use warnings;

my $greeting = “Hello World\n”;

print $greeting;

exit;

Page 8: Perl Introduction (OLD - NEARLY OBSOLETE)

Version 1.2.0 © Adam Trickett September-2007 Distributed under a creative commons Attribution-NonCommercial-ShareAlike licence.

8

Some BooksSome Books

http://books.perl.org/

Page 9: Perl Introduction (OLD - NEARLY OBSOLETE)

Version 1.2.0 © Adam Trickett September-2007 Distributed under a creative commons Attribution-NonCommercial-ShareAlike licence.

9

ComprehensiveComprehensivePerl Archive NetworkPerl Archive Network

● Over 10,000 modules● A module for every imaginable task:

● Web/CGI● Databases● SAP● MP3/Oggs● Time/Dates● Templating● and much much more!

Page 10: Perl Introduction (OLD - NEARLY OBSOLETE)

Version 1.2.0 © Adam Trickett September-2007 Distributed under a creative commons Attribution-NonCommercial-ShareAlike licence.

10

CPANCPAN

● Global system with mirrors worldwide.● PAUSE

● Perl Authors Upload SErver● RT

● Request Tracker● CPAN testers & CPANTS● Search/Kobe Search

● Two Web Based Search engines

Page 11: Perl Introduction (OLD - NEARLY OBSOLETE)

Version 1.2.0 © Adam Trickett September-2007 Distributed under a creative commons Attribution-NonCommercial-ShareAlike licence.

11

Killer Modules!Killer Modules!

● CGI● DBI● Template● CPAN● Apache mod_perl● File::Find::Rule● LWP/WWW::Mechanize● MVC/ORM

Page 12: Perl Introduction (OLD - NEARLY OBSOLETE)

Version 1.2.0 © Adam Trickett September-2007 Distributed under a creative commons Attribution-NonCommercial-ShareAlike licence.

12

Useful ResourcesUseful Resources● Perl Training Australia:

● http://perltraining.com.au/notes.html

● Ovid's CGI Course:● http://users.easystreet.com/ovid/cgi_course/

● Learn.perl.org:● http://learn.perl.org/

● On-line Documentation:● http://perldoc.perl.org/

● Randal's Perl Columns:● http://www.stonehenge.com/merlyn/columns.html

Page 13: Perl Introduction (OLD - NEARLY OBSOLETE)

Version 1.2.0 © Adam Trickett September-2007 Distributed under a creative commons Attribution-NonCommercial-ShareAlike licence.

13

Some Community SitesSome Community Sites

● PerlMonks:● http://www.perlmonks.org/

● use Perl;● http://use.perl.org/

● Perl Foundation:● http://www.perlfoundation.org/

● Perl Mongers:● http://www.pm.org/

Page 14: Perl Introduction (OLD - NEARLY OBSOLETE)

Version 1.2.0 © Adam Trickett September-2007 Distributed under a creative commons Attribution-NonCommercial-ShareAlike licence.

14

New SitesNew Sites

● Perl 5 Wiki● http://www.perlfoundation.org/perl5/

● London Perl Mongers/BBC Perl Teach-In● http://mag-sol.com/train/teachin/

● PerlBuzz● http://perbuzz.com/

Page 15: Perl Introduction (OLD - NEARLY OBSOLETE)

Version 1.2.0 © Adam Trickett September-2007 Distributed under a creative commons Attribution-NonCommercial-ShareAlike licence.

15

MeetingsMeetings

● OSCON - Open Source Conference● Originally Perl only, now everything open-

source● Expensive● http://conferences.oreillynet.com/

● YAPC - Yet Another Perl Confernce● Still just Perl● Cheaper● http://www.yapceurope.org/

Page 16: Perl Introduction (OLD - NEARLY OBSOLETE)

Version 1.2.0 © Adam Trickett September-2007 Distributed under a creative commons Attribution-NonCommercial-ShareAlike licence.

16

Smaller MeetingsSmaller Meetings

● PM Workshops● London.PM Workshop every winter

● PM TechMeets● London.PM and ThamesValley.PM

● Perl Birds of a Feather “BOF” meetings● LUGs

Page 17: Perl Introduction (OLD - NEARLY OBSOLETE)

Version 1.2.0 © Adam Trickett September-2007 Distributed under a creative commons Attribution-NonCommercial-ShareAlike licence.

17

More Links...More Links...

● http://www.cpan.org/

● http://search.cpan.org/

● http://kobesearch.cpan.org/

● http://rt.cpan.org/

● http://pause.perl.org/

● http://jobs.perl.org/

● http://cpants.perl.org/

● http://perldoc.perl.org/

● http://www.perl.com/

Page 18: Perl Introduction (OLD - NEARLY OBSOLETE)

Version 1.2.0 © Adam Trickett September-2007 Distributed under a creative commons Attribution-NonCommercial-ShareAlike licence.

18

This TalkThis Talk

● The original version of this talk can be obtained from me, or downloaded from my LUG in either Open Document format or PDF or as video in ogg, wmv or flash:

● http://www.hants.lug.org.uk/cgi-bin/wiki.pl?TechTalks/3rdJune2006

[email protected]

● PGP Key: 0x166C4BF0

Page 19: Perl Introduction (OLD - NEARLY OBSOLETE)

Version 1.2.0 © Adam Trickett September-2007 Distributed under a creative commons Attribution-NonCommercial-ShareAlike licence.

19

Some Screen Shots of SitesSome Screen Shots of Sites

Page 20: Perl Introduction (OLD - NEARLY OBSOLETE)

Version 1.2.0 © Adam Trickett September-2007 Distributed under a creative commons Attribution-NonCommercial-ShareAlike licence.

20

Page 21: Perl Introduction (OLD - NEARLY OBSOLETE)

Version 1.2.0 © Adam Trickett September-2007 Distributed under a creative commons Attribution-NonCommercial-ShareAlike licence.

21

Page 22: Perl Introduction (OLD - NEARLY OBSOLETE)

Version 1.2.0 © Adam Trickett September-2007 Distributed under a creative commons Attribution-NonCommercial-ShareAlike licence.

22

Page 23: Perl Introduction (OLD - NEARLY OBSOLETE)

Version 1.2.0 © Adam Trickett September-2007 Distributed under a creative commons Attribution-NonCommercial-ShareAlike licence.

23

Page 24: Perl Introduction (OLD - NEARLY OBSOLETE)

Version 1.2.0 © Adam Trickett September-2007 Distributed under a creative commons Attribution-NonCommercial-ShareAlike licence.

24

Page 25: Perl Introduction (OLD - NEARLY OBSOLETE)

Version 1.2.0 © Adam Trickett September-2007 Distributed under a creative commons Attribution-NonCommercial-ShareAlike licence.

25

Page 26: Perl Introduction (OLD - NEARLY OBSOLETE)

Version 1.2.0 © Adam Trickett September-2007 Distributed under a creative commons Attribution-NonCommercial-ShareAlike licence.

26

QQ&&AA