Presentation is loading. Please wait.

Presentation is loading. Please wait.

Perl Kurtis Hage.

Similar presentations


Presentation on theme: "Perl Kurtis Hage."— Presentation transcript:

1 Perl Kurtis Hage

2 A Brief History of (Perl) Time
1.0 Released in Larry Wall Interpreted, high-level scripting language (written in C) 3.0 released in 1989 under GNU Public License Perl 5 & 6... Designed as a general-purpose Unix scripting language to make report processing easier. Larry Wall continues to oversee developement. Current version: PEARL (Pre-existing language) vs Perl (remove a letter!)

3 Who Uses Perl? Bugzilla Amazon bbc.co.uk Craigslist IMDb LiveJournal
Slashdot Ticketmaster etc.

4 Perl Pros Open-source distribution Portability Writability!!!
Designed to make efficient use of expensive computer programmers Doesn't enforce a programming "style" Perl Slogans: "There's more than one way to do it" ; "Easy things should be easy and hard things should be possible." ; "Swiss Army Chainsaw of programming languages"

5 Perl Cons Readability (?) Bug tracking NOT tidy
Automatic data-typing (also a plus?) [Lists and Scalars] do what you want, unless you want consistency. --Perl 5 Documentation"""In general, [lists and scalars] do what you want, unless you want consistency."In general, [lists and scalars] do what you want, unless you want consistency." Perl is not a tidy language; it includes many features, tolerates exceptions to its rules, and employs heuristics to resolve syntactical ambiguities. Because of the forgiving nature of the compiler, bugs can sometimes be hard to find.

6 Uses of Pearl, perl, Perl, and PERL
PEARL -- Original name of the language after the Parable of the Pearl; was already a PEARL programming langauge. perl -- Typically a reference to Perl's compiler and how things are handled in the language itself Perl -- The name, and reference to, the actual langauge PERL -- SACRILEGE!! All-caps PERL is a sign of an outsider to the community; don't spell it this way.

7 Data Types Three main types $scalars @arrays %hashes
Scalars: strings, numbers, references, filehandles. NO DECLARATION OF TYPE!! 0b = binary, 0x = hexadecimal, 0 = octal Arrays: Store scalars, accessed via integer index (start at 0!!), unless declared negative, in which case they start at the end and work backwards. ONE DIMENSIONAL ONLY!! Hashes: Store scalars that are accessed via a string index called a key.

8 Object-Oriented Perl Supports OO Programming
Accomplished using packages//modules Example:

9 Concurrency Perl allows for Concurrency...sort of.
Not designed with concurrency in mind Accomplished via a threading module Each thread runs as a seperate virtual machine; only data that is explicitly marked as shared can be passed between threads.

10 Subroutines Allows anonymous or named subroutines
Declared with &, but not a mandatory declaration Code inside subroutine block "invisible" in scope outside of the block

11 Perl "Culture" and Community
Involved, active community (CPAN) Perl "Golf" Perl Poetry Obfuscation contests CPAN = Comprehensive Perl Archive Network(CPAN) Golf = reducing number of keystrokes to generate perl code Poetry = Must be a compilable, runnable piece of perl code.

12 Powerful Perl Examples (RSA)

13 Powerful Perl Examples (DVD Copy Protection Descramble)


Download ppt "Perl Kurtis Hage."

Similar presentations


Ads by Google