SlideShare a Scribd company logo
INTRODUCTION TO PERL
By
Sana Mateen
6/15/2016
1
PERL—PRACTICAL EXTRACTION
REPORT LANGUAGE
 Perl is a programming language developed by Larry Wall, especially
designed for text processing. Though Perl is not officially an acronym but
many times it is used as it stands for Practical Extraction and Report
Language. It runs on a variety of platforms, such as Windows, Mac OS, and
the various versions of UNIX.
 Perl is a general-purpose programming language originally developed for
text manipulation and now used for a wide range of tasks including system
administration, web development, network programming, GUI
development(wxperl and perl-tk interfaces), and more.
6/15/2016
2
WHAT IS PERL? AND PERL FEATURES ?
1. Perl is a stable, cross platform programming language.
2. Though Perl is not officially an acronym but few people used it as Practical
Extraction and Report Language.
3. It is used for mission critical projects in the public and private sectors.
4. Perl is an Open Source software, licensed under its Artistic License, or the GNU
General Public License (GPL).
5. Perl takes the best features from other languages, such as C, awk, sed, sh, and
BASIC, among others.
 Features:
1. Perls database integration interface DBI supports third-party databases including
Oracle, Sybase, Postgres, MySQL and others.
2. Perl works with HTML, XML, and other mark-up languages.
3. Perl supports Unicode.
4. Perl is Y2K compliant.
5. Perl supports both procedural and object-oriented programming.
6. Perl interfaces with external C/C++ libraries through XS or SWIG.
7. Perl is extensible. There are over 20,000 third party modules available from the
Comprehensive Perl Archive Network (CPAN).
6/15/2016
3
PERL AND THE WEB
 Perl used to be 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 can handle encrypted Web data, including e-commerce transactions.
 Perl can be embedded into web servers to speed up processing by as much
as 2000%.
 Perl's mod_perl allows the Apache web server to embed a Perl interpreter.
 Perl's DBI package makes web-database integration easy.
6/15/2016
4
PERL IS INTERPRETED
 Perl is an interpreted language, which means that your code can be run as is,
without a compilation stage that creates a non portable executable program.
 Traditional compilers convert programs into machine language. When you
run a Perl program, it's first compiled into a byte code, which is then
converted ( as the program runs) into machine instructions. So it is not quite
the same as shells, or Tcl, which are strictly interpreted without an
intermediate representation.
 It is also not like most versions of C or C++, which are compiled directly
into a machine dependent format.
6/15/2016
5
PERL - ENVIRONMENT SETUP
There is a set up of Perl Programming environment online.
Before we start writing our Perl programs, let's understand how to setup our Perl environment. Perl is
available on a wide variety of platforms −
•Unix
•Win 9x/NT/2000/
•WinCE
•Macintosh (PPC, 68K)
•Solaris (x86, SPARC)
•OpenVMS
•Symbian
•And many more...
This is more likely that your system will have perl installed on it. Just try giving the following command
at the $ prompt −
$perl -v
If you have perl installed on your machine then you will get a message something as follows −
6/15/2016
6
 Getting Perl Installation
 The most up-to-date and current source code, binaries, documentation, news, etc. are available at
the official website of Perl.
 Perl Official Website − http://www.perl.org/
 Install Perl
 Perl distribution is available for a wide variety of platforms. You need to download only the
binary code applicable for your platform and install Perl.
 If the binary code for your platform is not available, you need a C compiler to compile the source
code manually. Compiling the source code offers more flexibility in terms of choice of features
that you require in your installation.
 Here is a quick overview of installing Perl on various platforms.
 1) Unix and Linux Installation
 Here are the simple steps to install Perl on Unix/Linux machine.
 Open a Web browser and go to http://www.perl.org/get.html.
 Follow the link to download zipped source code available for Unix/Linux.
6/15/2016
7
oDownload perl-5.x.y.tar.gz file and issue the following commands at $ prompt.
oNOTE − Here $ is a Unix prompt where you type your command, so make sure you are not typing $
while typing the above mentioned commands.
oThis will install Perl in a standard location
o/usr/local/bin and
oits libraries are installed in /usr/local/lib/perlXX, where XX is the version of Perl that you are using.
oIt will take a while to compile the source code after issuing the make command.
oOnce installation is done, you can issue perl -v command at $ prompt to check perl installation. If
everything is fine, then it will display details of perl .
2) Windows Installation
oHere are the steps to install Perl on Windows machine.
oFollow the link for the Strawberry Perl installation on Windows http://strawberryperl.com
oDownload either 32bit or 64bit version of installation.
oRun the downloaded file by double-clicking it in Windows Explorer. This brings up the Perl install
wizard, which is really easy to use. Just accept the default settings, wait until the installation is finished,
and you're ready to roll!
6/15/2016
8
RUNNING A PERL
 These are the different ways to start Perl.
 (1) Interactive Interpreter
 You can enter perl and start coding right away in the interactive interpreter
by starting it from the command line. You can do this from Unix, DOS, or
any other system, which provides you a command-line interpreter or shell
window.
-e option ------ Runs Perl script sent in as
program
6/15/2016
9
(2) Script from the Command-line
A Perl script is a text file which keeps perl code in it and it can be executed at the
command line by invoking the interpreter on your application, as in the following
(3) Integrated Development Environment
You can run Perl from a graphical user interface (GUI) environment as well. All you need
is a GUI application on your system that supports Perl. You can download Padre, the
Perl IDE. You can also use Eclipse Plugin EPIC - Perl Editor and IDE for Eclipse if
you are familiar with Eclipse.
6/15/2016
10

More Related Content

PPTX
Introduction to scripts
PDF
Php course with live project training in janakpuri, New Delhi
PPTX
PHP .ppt
ODP
Managing Plone Projects with Perl and Subversion
PPTX
Programming
PPTX
Php: An Introduction
PDF
Future of .NET - .NET on Non Windows Platforms
Introduction to scripts
Php course with live project training in janakpuri, New Delhi
PHP .ppt
Managing Plone Projects with Perl and Subversion
Programming
Php: An Introduction
Future of .NET - .NET on Non Windows Platforms

What's hot (20)

PPTX
.Net Development Services VS | PHP Development Services
PDF
PDF
PHP vs ASP.NET
PPTX
.Net: Introduction, trends and future
PPT
PHP LICTURES ..........
PPT
PHP: Hypertext Preprocessor Introduction
PPTX
Training ppt
PDF
Single Sourcing RAP and RCP - Desktop and web clients from a single code base
PDF
Debugging LAMP Apps on Linux/UNIX Using Open Source Tools - Jess Portnot - OS...
PPTX
Java Programming (M&M)
PDF
How to Port Your .NET Applications to Linux Using Mono Tools for Visual Studio
PDF
IRJET- Mail Server Communication:PHP
ODP
Impress
PPTX
Driving Innovation with Component-based Development at Boeing
PDF
PHP
PPTX
Introduction to .NET Framework
PDF
Ruby on rails backend development preferred choice for product owners
PPTX
.NET Framework 4.0 – Changes & Benefits
PDF
ASP.NET on zLinux: A New Workload
PPTX
PowerShell for Developers
.Net Development Services VS | PHP Development Services
PHP vs ASP.NET
.Net: Introduction, trends and future
PHP LICTURES ..........
PHP: Hypertext Preprocessor Introduction
Training ppt
Single Sourcing RAP and RCP - Desktop and web clients from a single code base
Debugging LAMP Apps on Linux/UNIX Using Open Source Tools - Jess Portnot - OS...
Java Programming (M&M)
How to Port Your .NET Applications to Linux Using Mono Tools for Visual Studio
IRJET- Mail Server Communication:PHP
Impress
Driving Innovation with Component-based Development at Boeing
PHP
Introduction to .NET Framework
Ruby on rails backend development preferred choice for product owners
.NET Framework 4.0 – Changes & Benefits
ASP.NET on zLinux: A New Workload
PowerShell for Developers
Ad

Similar to Introduction to perl (20)

PPTX
Unit 1-introduction to perl
PDF
WEB PROGRAMMING UNIT V BY BHAVSINGH MALOTH
PPTX
PPTX
PPTX
perl lauange
ODP
lamp technology
ODP
Deepa ppt about lamp technology
PPTX
Group1_PERL.pptx
PPTX
Future of PERL in IT
PPT
Keeping up with Perl: Development, Upgrade and Deployment Options for Perl 5.12
PPT
Lamp technology
PPTX
programming language interface i.pptx
PPTX
Unit 1-introduction to scripts
PDF
Perl Chapter 1
PDF
Modern Perl for the Unfrozen Paleolithic Perl Programmer
PPT
PPTX
PPTX
Overview new programming languages
ODP
Nadhiya lamp
PPT
PHP
Unit 1-introduction to perl
WEB PROGRAMMING UNIT V BY BHAVSINGH MALOTH
perl lauange
lamp technology
Deepa ppt about lamp technology
Group1_PERL.pptx
Future of PERL in IT
Keeping up with Perl: Development, Upgrade and Deployment Options for Perl 5.12
Lamp technology
programming language interface i.pptx
Unit 1-introduction to scripts
Perl Chapter 1
Modern Perl for the Unfrozen Paleolithic Perl Programmer
Overview new programming languages
Nadhiya lamp
PHP
Ad

More from sana mateen (20)

PPTX
PPTX
PHP Variables and scopes
PPTX
Php intro
PPTX
Php and web forms
PPTX
PPTX
Files in php
PPTX
File upload php
PPTX
Regex posix
PPTX
Encryption in php
PPTX
Authentication methods
PPTX
Xml schema
PPTX
Xml dtd
PPTX
Xml dom
PPTX
PPTX
Intro xml
PPTX
Dom parser
PPTX
Unit 1-subroutines in perl
PPTX
Unit 1-uses for scripting languages,web scripting
PPTX
Unit 1-strings,patterns and regular expressions
PPTX
Unit 1-scalar expressions and control structures
PHP Variables and scopes
Php intro
Php and web forms
Files in php
File upload php
Regex posix
Encryption in php
Authentication methods
Xml schema
Xml dtd
Xml dom
Intro xml
Dom parser
Unit 1-subroutines in perl
Unit 1-uses for scripting languages,web scripting
Unit 1-strings,patterns and regular expressions
Unit 1-scalar expressions and control structures

Recently uploaded (20)

PDF
Automation-in-Manufacturing-Chapter-Introduction.pdf
PPTX
M Tech Sem 1 Civil Engineering Environmental Sciences.pptx
PPTX
OOP with Java - Java Introduction (Basics)
PPTX
Welding lecture in detail for understanding
PDF
PPT on Performance Review to get promotions
PPTX
KTU 2019 -S7-MCN 401 MODULE 2-VINAY.pptx
PDF
Operating System & Kernel Study Guide-1 - converted.pdf
PDF
The CXO Playbook 2025 – Future-Ready Strategies for C-Suite Leaders Cerebrai...
DOCX
573137875-Attendance-Management-System-original
PPTX
CYBER-CRIMES AND SECURITY A guide to understanding
PPTX
Sustainable Sites - Green Building Construction
PDF
R24 SURVEYING LAB MANUAL for civil enggi
PPTX
web development for engineering and engineering
PDF
Model Code of Practice - Construction Work - 21102022 .pdf
DOCX
ASol_English-Language-Literature-Set-1-27-02-2023-converted.docx
PPT
Mechanical Engineering MATERIALS Selection
PPTX
Engineering Ethics, Safety and Environment [Autosaved] (1).pptx
PPTX
Foundation to blockchain - A guide to Blockchain Tech
PPTX
FINAL REVIEW FOR COPD DIANOSIS FOR PULMONARY DISEASE.pptx
PPTX
MCN 401 KTU-2019-PPE KITS-MODULE 2.pptx
Automation-in-Manufacturing-Chapter-Introduction.pdf
M Tech Sem 1 Civil Engineering Environmental Sciences.pptx
OOP with Java - Java Introduction (Basics)
Welding lecture in detail for understanding
PPT on Performance Review to get promotions
KTU 2019 -S7-MCN 401 MODULE 2-VINAY.pptx
Operating System & Kernel Study Guide-1 - converted.pdf
The CXO Playbook 2025 – Future-Ready Strategies for C-Suite Leaders Cerebrai...
573137875-Attendance-Management-System-original
CYBER-CRIMES AND SECURITY A guide to understanding
Sustainable Sites - Green Building Construction
R24 SURVEYING LAB MANUAL for civil enggi
web development for engineering and engineering
Model Code of Practice - Construction Work - 21102022 .pdf
ASol_English-Language-Literature-Set-1-27-02-2023-converted.docx
Mechanical Engineering MATERIALS Selection
Engineering Ethics, Safety and Environment [Autosaved] (1).pptx
Foundation to blockchain - A guide to Blockchain Tech
FINAL REVIEW FOR COPD DIANOSIS FOR PULMONARY DISEASE.pptx
MCN 401 KTU-2019-PPE KITS-MODULE 2.pptx

Introduction to perl

  • 1. INTRODUCTION TO PERL By Sana Mateen 6/15/2016 1
  • 2. PERL—PRACTICAL EXTRACTION REPORT LANGUAGE  Perl is a programming language developed by Larry Wall, especially designed for text processing. Though Perl is not officially an acronym but many times it is used as it stands for Practical Extraction and Report Language. It runs on a variety of platforms, such as Windows, Mac OS, and the various versions of UNIX.  Perl is a general-purpose programming language originally developed for text manipulation and now used for a wide range of tasks including system administration, web development, network programming, GUI development(wxperl and perl-tk interfaces), and more. 6/15/2016 2
  • 3. WHAT IS PERL? AND PERL FEATURES ? 1. Perl is a stable, cross platform programming language. 2. Though Perl is not officially an acronym but few people used it as Practical Extraction and Report Language. 3. It is used for mission critical projects in the public and private sectors. 4. Perl is an Open Source software, licensed under its Artistic License, or the GNU General Public License (GPL). 5. Perl takes the best features from other languages, such as C, awk, sed, sh, and BASIC, among others.  Features: 1. Perls database integration interface DBI supports third-party databases including Oracle, Sybase, Postgres, MySQL and others. 2. Perl works with HTML, XML, and other mark-up languages. 3. Perl supports Unicode. 4. Perl is Y2K compliant. 5. Perl supports both procedural and object-oriented programming. 6. Perl interfaces with external C/C++ libraries through XS or SWIG. 7. Perl is extensible. There are over 20,000 third party modules available from the Comprehensive Perl Archive Network (CPAN). 6/15/2016 3
  • 4. PERL AND THE WEB  Perl used to be 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 can handle encrypted Web data, including e-commerce transactions.  Perl can be embedded into web servers to speed up processing by as much as 2000%.  Perl's mod_perl allows the Apache web server to embed a Perl interpreter.  Perl's DBI package makes web-database integration easy. 6/15/2016 4
  • 5. PERL IS INTERPRETED  Perl is an interpreted language, which means that your code can be run as is, without a compilation stage that creates a non portable executable program.  Traditional compilers convert programs into machine language. When you run a Perl program, it's first compiled into a byte code, which is then converted ( as the program runs) into machine instructions. So it is not quite the same as shells, or Tcl, which are strictly interpreted without an intermediate representation.  It is also not like most versions of C or C++, which are compiled directly into a machine dependent format. 6/15/2016 5
  • 6. PERL - ENVIRONMENT SETUP There is a set up of Perl Programming environment online. Before we start writing our Perl programs, let's understand how to setup our Perl environment. Perl is available on a wide variety of platforms − •Unix •Win 9x/NT/2000/ •WinCE •Macintosh (PPC, 68K) •Solaris (x86, SPARC) •OpenVMS •Symbian •And many more... This is more likely that your system will have perl installed on it. Just try giving the following command at the $ prompt − $perl -v If you have perl installed on your machine then you will get a message something as follows − 6/15/2016 6
  • 7.  Getting Perl Installation  The most up-to-date and current source code, binaries, documentation, news, etc. are available at the official website of Perl.  Perl Official Website − http://www.perl.org/  Install Perl  Perl distribution is available for a wide variety of platforms. You need to download only the binary code applicable for your platform and install Perl.  If the binary code for your platform is not available, you need a C compiler to compile the source code manually. Compiling the source code offers more flexibility in terms of choice of features that you require in your installation.  Here is a quick overview of installing Perl on various platforms.  1) Unix and Linux Installation  Here are the simple steps to install Perl on Unix/Linux machine.  Open a Web browser and go to http://www.perl.org/get.html.  Follow the link to download zipped source code available for Unix/Linux. 6/15/2016 7
  • 8. oDownload perl-5.x.y.tar.gz file and issue the following commands at $ prompt. oNOTE − Here $ is a Unix prompt where you type your command, so make sure you are not typing $ while typing the above mentioned commands. oThis will install Perl in a standard location o/usr/local/bin and oits libraries are installed in /usr/local/lib/perlXX, where XX is the version of Perl that you are using. oIt will take a while to compile the source code after issuing the make command. oOnce installation is done, you can issue perl -v command at $ prompt to check perl installation. If everything is fine, then it will display details of perl . 2) Windows Installation oHere are the steps to install Perl on Windows machine. oFollow the link for the Strawberry Perl installation on Windows http://strawberryperl.com oDownload either 32bit or 64bit version of installation. oRun the downloaded file by double-clicking it in Windows Explorer. This brings up the Perl install wizard, which is really easy to use. Just accept the default settings, wait until the installation is finished, and you're ready to roll! 6/15/2016 8
  • 9. RUNNING A PERL  These are the different ways to start Perl.  (1) Interactive Interpreter  You can enter perl and start coding right away in the interactive interpreter by starting it from the command line. You can do this from Unix, DOS, or any other system, which provides you a command-line interpreter or shell window. -e option ------ Runs Perl script sent in as program 6/15/2016 9
  • 10. (2) Script from the Command-line A Perl script is a text file which keeps perl code in it and it can be executed at the command line by invoking the interpreter on your application, as in the following (3) Integrated Development Environment You can run Perl from a graphical user interface (GUI) environment as well. All you need is a GUI application on your system that supports Perl. You can download Padre, the Perl IDE. You can also use Eclipse Plugin EPIC - Perl Editor and IDE for Eclipse if you are familiar with Eclipse. 6/15/2016 10