Perl Kurtis Hage
A Brief History of (Perl) Time 1.0 Released in 1987 -- 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: 5.15.4 PEARL (Pre-existing language) vs Perl (remove a letter!)
Who Uses Perl? Bugzilla Amazon bbc.co.uk Craigslist IMDb LiveJournal Slashdot Ticketmaster etc.
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"
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.
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.
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.
Object-Oriented Perl Supports OO Programming Accomplished using packages//modules Example:
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.
Subroutines Allows anonymous or named subroutines Declared with &, but not a mandatory declaration Code inside subroutine block "invisible" in scope outside of the block
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.
Powerful Perl Examples (RSA)
Powerful Perl Examples (DVD Copy Protection Descramble)