Unit 1. Introduction and History of Perl

In this Unit you will know about the history and philosophy of Perl. Some interesting Facts about Perl.

Agenda

  • Introduction to Perl
  • Perl History
  • Perl Philosophy

Introduction

  • A scripting language
  • Operating systems can do many things
  • copy, move, create, delete, compare files
  • execute programs, including compilers
  • schedule activities, monitor processes, etc.
  • A command-line interface gives you access to these functions, but only one at a time
  • A scripting language is a “wrapper” language that integrates OS functions

Some Scripting Languages

  • UNIX has sh, bash, ksh, csh, perl
  • Macintosh has AppleScript, Frontier
  • Windows does not have any scripting languages – probably due to weaknesses of DOS
  • Generic scripting languages include:
  • Perl (most popular)
  • Python (Java-like, best for large programs)

Perl

  • “Practical Extraction and Reporting Language”
  • Written by Larry Wall and first released in 1987
  • Perl has become a very large system of modules
  • Name came first, then the acronym
  • Perl is a language for easily manipulating text, files and processes
  • -Originally aimed at systems administrators and developers

What is Perl?

  • Perl is a High-level Scripting language
  • Faster than sh or csh, slower than C
  • No need for sed, awk, head, wc, tr, …
  • Compiles at run-time
  • Available for Unix, PC, Mac
  • Best Regular Expressions on Earth

Perl History

  • 1986-87 – Perl was invented by Larry Wall at NASA’s Jet Propulsion Labs
  • 1987-Dec Perl 1 introduced Perl to the world.
  • 1988-Jun Perl 2 introduced Henry Spencer’s regular expression package.
  • 1989-Oct Perl 3 introduced the ability to handle binary data.
  • 1991-Mar Perl 4 introduced the first Camel book.
  • 1994-Oct Perl 5 introduced everything else, (OOP, threads…)
  • 2014-05-27 Perl 5.20 has been released by Ricardo Signes.
  • Latest Version is 5.24

Perl Philosophy

  • TIMTOWTDI
  • TIMTOWTDI is pronounced “Tim Toady” and is:
  • There is more than one way to do it
  • Perl aims to be aggressively non-prescriptivist.
  • Prescriptivism is the attitude or belief that one variety of a language is superior to others and should be promoted as such.
  • Every problem should have multiple solutions.

Making easy things easy & hard things possible

  • This quote comes from the front of Learning Perl, also known as the Llama.
  • It goes hand-in-hand with TIMTOWTDI.
  • Every problem has multiple solutions implies every problem has at least one solution 🙂

linguistics background

  • Perl’s creator Larry Wall has a linguistics background, and took some of that with him when he designed Perl.
  • Keywords such as “for”, “my”, “defined”, “say”, “do”, “while”, “if”, “unless”, and “use” all read quite nicely to English eyes as well as to programmer eyes.

Low Ambiguity

  • In many languages this is acceptable:
puts 4 + 2                             # 6
puts “ram" + “n"               # “ramn"
puts “6" + 2                         # `+': can't convert num into String
In Perl we use different operators:
say 1 + 2;                              # 3
say “R" . “N";                      # “RN"
say "2" + 1;                          # 3
say "2" . 1;                           # 21
 

 

SEE ALL Add a note
YOU
Add your Comment
 

Recent Posts

About The SkillPedia

The Skill Pedia is a platform for online training. It offers great learning experience for learners by offering features such as Interactive Videos, Interaction with Trainer, Assignments, Rich Audio Visuals and Handouts.

The Course Completion Certificate generated automatically based on your performance after the course is complete is an edge.

For Trainers, it is a platform for sharing your Skills which may be in the form of videos, slides, handouts, e-books or even consulting and get up to 85% of the fee you decide for the course.

The Skill Pedia - Learn or Teach a Skill

WhatsApp chat
X