CS 105 Perl: Course Introduction Nathan Clement 13 May 2014.

Slides:



Advertisements
Similar presentations
CST8177 awk. The awk program is not named after the sea-bird (that's auk), nor is it a cry from a parrot (awwwk!). It's the initials of the authors, Aho,
Advertisements

CSE 105 Structured Programming Language (C)
Javascript Code Quality Check Tools Javascript Code Quality Check Tools JavaScript was originally intended to do small tasks in webpages, but now JavaScript.
Everything You Ever Wanted To Know About $# But Couldn’t Google November 13 th, 2014 – Houston Perl Mongers Robert Stone HostGator.com.
Object Oriented Programming in Java George Mason University Fall 2011
CSE S. Tanimoto Perl Introduction 1 Perl Practical Extraction and Report Language Perl: Developed by Larry Wall in the late 1980s. Builds on...
Server-Side vs. Client-Side Scripting Languages
CS Lecture 03 Outline Sed and awk from previous lecture Writing simple bash script Assignment 1 discussion 1CS 311 Operating SystemsLecture 03.
Perl6 Michael Bryson Mark Staton Alex Varghese. Overview  Perl stands for practical extraction and report language  Was written as a language to scan.
Python Jordan Miller and Lauren Winkleman CS 311 Fall 2011.
Scripting Languages CS351 – Programming Paradigms.
Scripting Languages. Originally, a script was a file containing a sequence of commands that needed to be executed Control structures were added to make.
Perl Lecture #1 Scripting Languages Fall Perl Practical Extraction and Report Language -created by Larry Wall -- mid – 1980’s –needed a quick language.
Programming Introduction November 9 Unit 7. What is Programming? Besides being a huge industry? Programming is the process used to write computer programs.
Introduction to a Programming Environment
CSE S. Tanimoto Perl Introduction 1 Perl Practical Extraction and Report Language Shell-level scripting language: Glue that ties together programs.
Python Introduction.
PYTHON: LESSON 1 Catherine and Annie. WHAT IS PYTHON ANYWAY?  Python is a programming language.  But what’s a programming language?  It’s a language.
11 Getting Started with C# Chapter Objectives You will be able to: 1. Say in general terms how C# differs from C. 2. Create, compile, and run a.
INTERNET APPLICATION DEVELOPMENT For More visit:
Introduction to Perl Practical Extraction and Report Language or Pathologically Eclectic Rubbish Lister or …
1 Perl Perl basics Perl Elements Arrays and Hashes Control statements Operators OOP in Perl.
Introduction to Programming Peggy Batchelor.
Computer Programming for Biologists Oct 30 th – Dec 11 th, 2014 Karsten Hokamp  Fill out.
COMP 171: Principles of Computer Science I John Barr.
Programming for Beginners Martin Nelson Elizabeth FitzGerald Lecture 13: An Introduction to C++
LING/C SC/PSYC 438/538 Lecture 2 Sandiway Fong. Today’s Topics Did you read Chapter 1 of JM? – Short Homework 2 (submit by midnight Friday) Today is Perl.
Topic 1: Welcome CSE2395/CSE3395 Perl Programming.
A very basic overview of Server-Side Scripting Or what is PHP, Perl, Python, Ruby and what can they do for me?
Sed, awk, & perl CS 2204 Class meeting 13 *Notes by Mir Farooq Ali and other members of the CS faculty at Virginia Tech. Copyright 2003.
Introduction to Perl Yupu Liang cbio at MSKCC
Introduction to PHP Advanced Database System Lab no.1.
Introduction to Unix – CS 21
1 Introduction to Perl CIS*2450 Advanced Programming Techniques.
Introduction to Perl “Practical Extraction and Report Language” “Pathologically Eclectic Rubbish Lister”
Introduction to Perl William G. Dishman CUR/516 November 5, 2014.
Introduction to Python Lesson 1 First Program. Learning Outcomes In this lesson the student will: 1.Learn some important facts about PC’s 2.Learn how.
1 Introduction to Scripting Languages (with Perl).
Chapter Twelve sed, awk & perl1 System Programming sed, awk & perl.
An Overview of Perl A language for Systems and Network Administration and Management: An overview of the language.
 2001 Prentice Hall, Inc. All rights reserved. Chapter 1 – Introduction to Computers, the Internet and the World Wide Web Outline 1.1Introduction 1.2What.
(the language for getting your job done) Internet Programming Diana Hingst.
CSC 1010 Programming for All Lecture 2 Introduction to Python Some material based on material from Marty Stepp, Instructor, University of Washington.
CSE S. Tanimoto Perl-Intro - 1 Perl Practical Extraction and Report Language Shell-level scripting language: Glue that ties together programs written.
Perl Lab #11 Intro to Perl Debbie Bartlett. Perl Lab #1 2 Perl Practical Extraction and Report Language –or- Pathologically Eclectic Rubbish Lister Created.
 History  Ease of use  Portability  Standard  Security & Privacy  User support  Application &Popularity Today  Ten Most Popular Programming Languages.
1 PHP Intro PHP Introduction After this lecture, you should be able to: Know the fundamental concepts of Web Scripting Languages in general, PHP in particular.
ITP 109 Week 2 Trina Gregory Introduction to Java.
1 Lecture 7 Introduction to Shell Scripts COP 3353 Introduction to UNIX.
Perl Ed Finegan. Overview of Pearl Perl is a high-level programming language written by Larry Wall. It derives from the C programming language and to.
Programming Languages Meeting 12 November 18/19, 2014.
Quiz 1 A sample quiz 1 is linked to the grading page on the course web site. Everything up to and including this Friday’s lecture except that conditionals.
CSE 303 Concepts and Tools for Software Development Richard C. Davis UW CSE – 10/9/2006 Lecture 6 – String Processing.
Introduction to Perl: Practical extraction and report language
 2001 Prentice Hall, Inc. All rights reserved.
Development Environment
CST 1101 Problem Solving Using Computers
UMBC CMSC 104 – Section 01, Fall 2016
PERL.
PERL.
SVTRAININGS. SVTRAININGS Python Overview  Python is a high-level, interpreted, interactive and object-oriented scripting language. Python is designed.
Henning Schulzrinne Advanced Programming
Unit# 8: Introduction to Computer Programming
Introduction to Computers and Python
Perl Practical Extraction and Report Language
LING 408/508: Computational Techniques for Linguists
CS 1111 Introduction to Programming Spring 2019
Chapter 1: Programming Basics, Python History and Program Components
Perl Practical Extraction and Report Language
Presentation transcript:

CS 105 Perl: Course Introduction Nathan Clement 13 May 2014

Agenda Course overview Review syllabus Informal survey Next class: paper survey Perl introduction

Perl origins Larry Wall Graduate study in linguistics System administrator at NASA Perl 1.0 in 1987

Perl NAME perl | Practical Extraction and Report Language SYNOPSIS perl [options] filename args DESCRIPTION Perl is a interpreted language optimized for scanning arbi- trary text files, extracting information from those text files, and printing reports based on that information. It's also a good language for many system management tasks. The language is intended to be practical (easy to use, effi- cient, complete) rather than beautiful (tiny, elegant, minimal). It combines (in the author's opinion, anyway) some of the best features of C, sed, awk, and sh, so people familiar with those languages should have little difficulty with it. (Language historians will also note some vestiges of csh, Pascal, and even BASIC|PLUS.) Expression syntax corresponds quite closely to C expression syntax. If you have a problem that would ordinarily use sed or awk or sh, but it exceeds their capabilities or must run a little fas- ter, and you don't want to write the silly thing in C, then perl may be for you. There are also translators to turn your sed and awk scripts into perl scripts. OK, enough hype.

Perl over time Path to Maturity Perl – December 18, 1987 Perl – June 5, 1988 Perl – October 18, 1989 Perl – March 21, 1991 Perl – October 18, 1994 – “Complete rewrite” Perl ??? – Project announced on July 19, 2000 – “eventually evolved into a separate language”

Perl over time Path to Maturity Perl – December 18, 1987 Perl – June 5, 1988 Perl – October 18, 1989 Perl – March 21, 1991 Perl – October 18, 1994 – “Complete rewrite” – “Perl” means Perl5

Getting the name right Perl – Not PERL Not PERL – The language is Perl – The interpreter is perl – Originally named Pearl – Some “backronyms” are in common use Practical Extraction and Report Language Pathologically Eclectic Rubbish Lister

More Perl culture There’s more than one way to do it (TMTOWTDI) – Golfing – Conciseness – Terseness – Obfuscation

Do What I Mean Do What I Mean (DWIM) The evolution of DWIM: DWIM → DWIMmy → dwimmy “perl dwimmy” on Google: “So non-dwimmy open variants are a good idea to keep around” “Non-dwimmy hyperoperator” “I don’t think this is DWIMMY at all.” “that seems to be pretty dwimmy”

Programming Taxonomy: Where Perl Fits In Perl… is interpreted – Compiled at runtime into bytecode – Bytecode is interpreted is dynamically typed – Variables don’t have types – Values have types has automatic memory management – Memory is not allocated by the programmer – No malloc/free, new/delete analogue These features are typical of “scripting languages”

Programming Taxonomy: Perl’s Relatives Just a few similar languages: Python PHP Ruby

So Why Perl? Perl Python PHP

What is Perl good for? Text processing Data manipulation (“munging”) Quick development of tools One-offs System integration “Glue” code Databases, Web, etc. “Real” systems

What is good about Perl? Very quick development – Once you learn it Easy things are easy, and typically short Great documentation Lots of books Installed out of the box on many Unix platforms – or easily available as a package Typically comes “batteries included” – Especially since Perl 5.8 (2002) Huge collection of free modules (CPAN)

Your first Perl program Create a file – Open your editor – Save an empty file In another terminal, type perl that-file – This is one way to run your program

Your second Perl program Type the following: print "Some boring text\n"; Save your file and run it.

Running Your Program Directly (1) We don’t want to type perl your-program We’d rather type./your-program

Running Your Program Directly (2) At the top of your program, type the following: #!/usr/bin/perl This tells the program loader how to run your program. From a terminal (outside your editor), type chmod +x your-program This marks the file as executable so Unix will allow it to execute. Very first line “Hash-bang” line

Homework Write your own Hello, World program that I can run like./foo. I don’t care what you print out, as long as it prints something. This will require: getting a Unix account learning the rudimentary features of an editor writing one correct Perl statement learning how to use turnin

Homework Due Date Assignment 1 is due Wednesday, January 22, but I recommend completing it ASAP.