Lecture10

Lecture10 - Lecture 10 Introduction to Perl COP 3344 Introduction to UNIX 1 History Perl stands for Practical Extraction and Report Language Larry

Info iconThis preview shows pages 1–6. Sign up to view the full content.

View Full Document Right Arrow Icon
Lecture 10 Introduction to Perl COP 3344 Introduction to UNIX 1
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
History • Perl stands for Practical Extraction and Report Language • Larry Wall created Perl in the mid 80’s • Perl is free for use and is distributed under the NU public license 2 GNU public license • CPAN (Comprehensive Perl Archive Network) is the authoritative site for getting Perl code and information
Background image of page 2
Advantages of Perl • Fills the gap between shell programming and a conventional compiled programming language like C or C++ • Perl code is very dense so is normally smaller than code (often 30% to 70% of the C program) 3 C code (often 30% to 70% of the C program) • Good for quick and dirty programs, good for text manipulation programs • Perl is very portable
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Perl is interpreted • The Perl program is first converted (compiled) into bytecodes when the program is invoked and then the bytecodes are then interpreted • Similar in this way to Java aster than the shell interpretation 4 • Faster than the shell interpretation • Perl is however still slower than conventionally compiled languages • The bytecodes compiler is reasonably fast
Background image of page 4
A sample Perl program #!/usr/bin/perl -w #a test program hello world print “hello world!\n”; exit 0; 5 • The first line is like a shell script; it indicates the
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 6
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 04/23/2008 for the course COP 3344 taught by Professor Sudhir during the Spring '08 term at FSU.

Page1 / 16

Lecture10 - Lecture 10 Introduction to Perl COP 3344 Introduction to UNIX 1 History Perl stands for Practical Extraction and Report Language Larry

This preview shows document pages 1 - 6. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online