Your SlideShare is downloading. ×
  • Like
Perl
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×

Now you can save presentations on your phone or tablet

Available for both IPhone and Android

Text the download link to your phone

Standard text messaging rates apply
Published

 

  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
    Be the first to like this
No Downloads

Views

Total Views
877
On SlideShare
0
From Embeds
0
Number of Embeds
0

Actions

Shares
Downloads
5
Comments
0
Likes
0

Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide

Transcript

  • 1. (the language for getting your job done) Internet Programming Diana Hingst
  • 2.
    • Dynamic programming language
    • Intended to be practical (easy to use & efficient)
    • Widely adopted for its text processing
    • One of “The Three P’s” (Perl, PHP, Python) for writing web applications
  • 3.
    • File system manipulation
    • Database administration
    • Client-server programming
    • Secure programming
    • Object-oriented programming
    • GUI development
  • 4.
    • Created by Larry Wall in 1987
    • Designed as a glue for Unix OS
    • Originally named “PEARL”
    Figure 1: Larry Wall
  • 5.
    • First Edition published in 1991 as a reference guide to Perl.
    • Previously, documentation was a single (very long) man page.
    • Perl 4 released.
    Figure 2: Programming Perl Cover
  • 6.
    • http://www.cpan.org/
  • 7.
    • Answer: Both
    • Compiles into an intermediate format
      • Optimizes & gives instant feedback
    • Interprets the intermediate format to execute
  • 8.
    • #Comment
    • $number = “4”;
    • $string = “3 apples”;
    • @array = (“couch”, “movie”, “drink”);
    • %hash = (joe => ‘red’, sam => ‘blue’);
    • $a ** $b #a^b
    • $a . $b #String Concatenation
    • $a x $b #Repeat a b times
  • 9.
    • $camels = ‘123’;
    • print $camels + 1; # Prints 124
    • $a = “8”;
    • print $a + “1”; # Prints 9
    • print $a . “1”; # Prints 81
  • 10.
    • Open a text editor
    • Save with file extension .pl (or .cgi)
    • We’ve located the PERL interpreter and told it we’re going to be working with a web browser or in a web environment
  • 11.
    • Upload it to your web server
    • Run the program in one of three ways
      • Link to it
        • <a href=myscript.cgi>Click Here</a>
      • Write it into your HTML file
        • <p><!--#include virtual=“myscript.cgi”-->
      • Action item of a form
        • <form action=myscript.cgi>
      • Unix command line
        • perl myscript.cgi
  • 12.
    • Perl Code
    • HTML Code
  • 13.
    • Data Tracing Mechanism
      • Automatically determines which data was derived from insecure sources
    • Specially Protected Compartments
      • Able to safely execute Perl code that may be dangerous/insecure
  • 14.
    • Rotate Banners
    • Generate Text & HTML on the fly
    • Set Cookies
    • Provide Shopping Carts
  • 15.
    • Amazon.com
    • LiveJournal.com
    • Ticketmaster.com
    • IMDb.com
  • 16.
    • Writing poems that can actually be compiled as legal Perl code.
    • if ((light eq dark) && (dark eq light)
    • && ($blaze_of_night{moon} == black_hole)
    • && ($ravens_wing{bright} == $tin{bright})){
    • my $love = $you = $sin{darkness} + 1;
    • };
  • 17.
    • Programming Perl 2 nd Edition
    • http://websitehelpers.com/perl/
    • http://www.tizag.com/perlT/index.php
    • http://www.linuxjournal.com/article/3394
    • http://en.wikipedia.org/wiki/Larry_Wall
    • http://en.wikipedia.org/wiki/Perl
    • http://www.foo.be/docs/tpj/issues/vol5_1/tpj0501-0012.html