1 / 15

Perl

Perl. Drew Murphy Drew Ebelhar. There’s more than one way to do it!. History. December 18, 1987 Creator- Larry Wall Objective: To develop a general purpose Unix scripting language to make report processing easier.

PamelaLan
Download Presentation

Perl

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Perl Drew Murphy Drew Ebelhar There’s more than one way to do it!

  2. History • December 18, 1987 • Creator- Larry Wall • Objective: To develop a general purpose Unix scripting language to make report processing easier. • Gained widespread popularity in the late ‘90s as a CGI scripting language. • Perl 5 is the latest version, with Perl 6 currently under development.

  3. Changes from 5 to 6 • Most changes attempt to normalize language. • Adds static typing to the already present dynamic typing. • Makes object-oriented programming easier. • Introduces feature similar to interfaces in Java. • Syntactical simplification.

  4. Brief Overview • Perl is a high-level general purpose Unix based scripting language • Named “Perl” after the Parable of the Pearl in the Gospel of Matthew. • Occasionally backronymedPractical Extraction and Report Language. • Derived heavily from C. • Together with Python and PHP, form the three P’s of the internet, which denote the most popular dynamic languages for writing web applications.

  5. Functional ity • TEXT MANIPULATION • CGI scripting • Graphics programming • System administration • Network programming • Bioinformatics • Lovingly referred to as the “Swiss army chainsaw of programming languages”, as well as the “duct tape that holds the internet together”.

  6. Who’s using Perl? • Amazon • Craigslist • IMDb • Yahoo • Priceline

  7. Design • While Fortran and C attempt to make efficient use of the expensive hardware, Perl makes efficient use of expensive programmersby making code easy to write. • Perl is extremely generous to the programmer at the expense of CPU and memory resources • The compiler is very forgiving and as a result debugging can be difficult • Does not enforce any particular paradigm(procedural,OOP,functional)

  8. Sample Program – Hello World #!/usr/bin/perl use strict; use warning; my $hello = "Hello World!"; print $hello;

  9. Some Code $ perl myscript.pl $myVar = 10; $myOtherVar = 9; $myString = “Some string.\n”; @someArray = (“An”,”Array”,”of”,”Strings”); print(“@someArray”); if($myVar != $myOtherVar) { print(“Ten does most definitely not equal nine.\n”); else{ print(“The universe exploded.\n”); } for $p (1..10) { print(“$p\n”); }

  10. Readability • Pros • None. • Cons • Usually many ways to accomplish an operation. • Tolerates exceptions to its rules. • Large number of language primitives.

  11. Writability • Pros • Easy to learn, yet extensive. • Supports many programming paradigms, such as objected-oriented, procedural, and functional programming. • Many built-in functions, such as sorting. • Can interact with other languages within code. • Cons • No writing standard for the language exists.

  12. Reliability • Pros • Dynamic type checking. • Cons • Doesn’t require variable declaration unless the “use strict;” command is used. • Compiler is not strict, so bugs are difficult to find when present.

  13. Cost • Pros • Easy to learn, so cost of training programmers is cheap. • Free • Uses hybrid implementation system, so compilation time is faster. • Available on many platforms. • Cons • Difficult to maintain or update programs, as there is generally poor readability.

  14. References http://en.wikipedia.org/wiki/Perl http://en.wikipedia.org/wiki/Perl_6 http://www.perl.org/ http://perl-begin.org/learn/Perl-perl-but-not-PERL/ http://perl-begin.org/tutorials/perl-for-newbies/part1/ http://www.tizag.com/perlT/perlarrays.php

  15. THE END

More Related