Presentation is loading. Please wait.

Presentation is loading. Please wait.

Perl Michael U. Ang. History of Perl Perl was introduced in 1987 reason for its creation was that Mr. Wall was unhappy by the functionality that sed,

Similar presentations


Presentation on theme: "Perl Michael U. Ang. History of Perl Perl was introduced in 1987 reason for its creation was that Mr. Wall was unhappy by the functionality that sed,"— Presentation transcript:

1 Perl Michael U. Ang

2 History of Perl Perl was introduced in 1987 reason for its creation was that Mr. Wall was unhappy by the functionality that sed, C, awk and the Bourne Shell offered him. He looked for a language that will combine all of their best features, while having as few disadvantages of its own.

3 Cont… A brief history of Perl Perl became especially popular as a language for writing server-side scripts for web-servers. But that's not the only use of perl, as it is commonly used for system administration tasks, managing database data, as well as writing GUI applications.

4 Perl Influences

5 written by Larry Wall A GNU product FREE, Open Source software Interpreted and not compiled! 1º used as a scripting language originally designed for UNIX ®, but is portable to other O/S stable, cross platform programming language Introduction

6 What does Perl stand for? ‘Perl’ isn’t really an acronym 2 favorite expansion: -- Practical Extraction Report Language -- Pathologically Eclectic Rubbish Lister It's not PERL or P.E.R.L. 'Perl' refers to the language 'perl' to the interpreter that runs the programs written in Perl

7 Perl Mantras Make easy things easy; make difficult things possible. TIMTOWTDI: There is more than one way to do it. DWIM: Do What I Mean

8 Versions VersionDescriptionsYear Perl 0was never introduced to the public. Larry Wall only distributed this copy to his “officemates”. --- Perl 1released on to usenet's alt.comp.sources on Dec 18, 1987 1987 Perl 2expanded the regular expression support (Perl 2 introduced Henry Spencer's regular expression package) 1988 Perl 3introduced the ability to handle binary data (embedded nulls) 1989

9 Cont… Versions VersionDescriptionsYear Perl 4introduced the first Camel book. final Perl4 release, 4.036 in 1993 1991 Perl 5drastic changes in syntax has been made; backward compatible; it makes a lot of the old code obsolete. introduced such things as hard references, modules, objects and lexical scoping [in other words: introduced everything else, including the ability to introduce everything else] most up-to-date stable version is 5.8 1994 / 1995

10 Perl 6works in the way for (coming soon) Perl will include many new features not found in perl version 5 --- VersionDescriptionsYear Cont… Versions

11 Perl Features Perl takes the best features from other languages, such as C, awk, sed, sh, and BASIC, among others. Perls database integration interface (DBI) supports third-party databases including Oracle, MySQL and others. works with HTML, XML, and other mark-up languages.

12 Cont… Perl Features supports Unicode. supports both procedural and OO programming. extensible. The Perl interpreter can be embedded into other systems.

13 Perl & the Web Perl is the most popular web programming language due to its text manipulation capabilities and rapid development cycle. Perl is widely known as "the duct-tape of the Internet". Perl's CGI.pm module, part of Perl's standard distribution, makes handling HTML forms simple. Perl can handle encrypted Web data, including e-commerce transactions.

14 Cont… Perl and the Web Perl can be embedded into web servers to speed up processing by as much as 2000%. mod_perl allows the Apache web server to embed a Perl interpreter. Perl's DBI package makes web-database integration easy.

15 Sample Programs

16 Perl is interpreted, so no compilation is needed. To use Perl, create a text file that contains the Perl program. It is recommended that you end the filenames of your Perl scripts with ".pl" in order to distinguish them as Perl scripts. After you are done, invoke the Perl interpreter with the name of the file you created. Assuming your file is name "myscript.pl", you should type: The Perl development cycle # perl myscript.pl

17 Hello World Note: Sample programs where made using OpenPerl IDE

18 print -- echo strings and expressions to the screen. The "Hello World" program can be written in perl as follows: The string is enclosed in double-quotes("... ") bec that's how string constants are represented in perl. The semi-colon at the end indicates that this is the end of a perl command. Every perl command should be terminated with a semicolon. The "Hello World" program print "Hello World";

19 Another Example

20

21 STDIN is inherited from the stdin of Shell. next statement -- restarts the next iteration of the loop, skipping over the rest of the statements in the loop and re-evaluating the loop expression. -- its like the "continue" statement in C, Awk, or Shell

22 Applications written in Perl

23 Amazon Online Auctions allowed for close of auctions and customer feedback PayPal Shopping Cart Program is a CGI program written in Perl 5 and Javascript. was designed to work directly with PayPal. Yahoo

24 X-Forum bulletin board is a free bulletin board, written in Perl. Features: guests posting limitations, reply e-mail notification for members, and many moderating tools. Wemail a Web-based email program written in Perl. It checks POP and IMAP and sends via sendmail or SMTP. features: custom folders, address book, attachments, html email, filters, sorting, search, message labeling and more. It requres only CGI.pm.

25 Url’s and Books

26 http://www.perl.com/ -- the mother of all Perl sites (according to the site) www.cpan.org or http://www.perl.com/CPAN/www.cpan.orghttp://www.perl.com/CPAN/ -- CPAN is the Comprehensive Perl Archive Network, a large collection of Perl software, modules and documentation -- mirrors: http://www.cpan.org/SITES.html and http://mirror.cpan.org/.http://www.cpan.org/SITES.html http://mirror.cpan.org/ Note that CPAN is also the name of a Perl module, CPAN.pm, which is used to download and install Perl software from the CPAN archive.

27 http://www.pm.org/ -- a loose association of international Perl User Groups. http://www.perldoc.com/ -- Perldoc.com http://www.perl.org/ Perl.org

28 http://www.perlmonks.com/ -- Perl Monks http://use.perl.org/ -- Perl News

29 OpenPerl IDE (integrated development environment) -- an IDE for writing and debugging Perl scripts with any standard Perl distribution under Win95/98/NT/2000/XP. -- written in Delphi 5 Object Pascal and Perl and it is OpenSource http://open-perl-ide.sourceforge.net/

30 Perl Ports (Binary Distributions) http://www.cpan.org/ports/index.html -- contains listing of available Perl distribution codes for almost all types of operating systems. Perl Mailing lists http://lists.cpan.org/ Perl FAQ http://perlfaq.cpan.org/

31 Books Programming Perl by Larry Wall, Tom Christiansen, Jon Orwant (O'Reilly July 2000) Learning Perl by Randal L. Schwartz, Tom Phoenix (O'Reilly, July 2001)

32 Cont… Books PERL How to Program by Deitel and Deitel et.al. (Prentice Hall, February 2001) Perl by Example by Ellie Quigley (Prentice Hall PTR, September 2001)

33 Cont… Books Professional Perl Development by Wainwright et.al. (Wrox Press, April 2001) Professional Perl Programming by Wainwright et.al. (Wrox Press, February 2001)

34 Perl Purity Test http://www.cpan.org/misc/perl.purity.test -- Just for fun.


Download ppt "Perl Michael U. Ang. History of Perl Perl was introduced in 1987 reason for its creation was that Mr. Wall was unhappy by the functionality that sed,"

Similar presentations


Ads by Google