An Overview of Perl A language for Systems and Network Administration and Management: An overview of the language.

Slides:



Advertisements
Similar presentations
Perl Practical Extration and Reporting Language An Introduction by Shwen Ho.
Advertisements

National Database Templates for the Biosafety Clearing-House Application (NDT-nBCH) Overview of the US nBCH Applications.
Introducing JavaScript
A Guide to Unix Using Linux Fourth Edition
The Linux Operating System Lecture 6: Perl for the Systems Administrator Tonga Institute of Higher Education.
TD Ameritrade IT audit intern Ramez Mina. Position definition Department head  IT audit intern Managers  system analyst and developer to build automated.
CSE S. Tanimoto Perl Introduction 1 Perl Practical Extraction and Report Language Perl: Developed by Larry Wall in the late 1980s. Builds on...
Practical Extraction & Report Language Picture taken from
Introduction to Perl. How to run perl Perl is an interpreted language. This means you run it through an interpreter, not a compiler. Your program/script.
Guide To UNIX Using Linux Third Edition
CSE S. Tanimoto Perl Introduction 1 Perl Practical Extraction and Report Language Shell-level scripting language: Glue that ties together programs.
Using Perl on an AS/400 / iSeries Presented by David Mount – Owner of Texas400 Computer Consulting See for more on Perl on thewww.texas400.com.
1 CS428 Web Engineering Lecture 18 Introduction (PHP - I)
The “R” Statistical Package Naomi Altman Dept. of Statistics PSU.
Document Processing Ways to centralize and streamline your Endangered Species Act document processing procedures.
Introduction to Python: Slides Referenced in Homework 0 CSE-391: Artificial Intelligence University of Pennsylvania Matt Huenerfauth January 2005.
8/17/2015CS346 PHP1 Module 1 Introduction to PHP.
COMP An Introduction to Computer Programming : University of the West Indies COMP6015 An Introduction to Computer Programming Lecture 03.
Inti Online Login Page (Lecturer/Student/Administrator View)
AIT 616 Fall 2002 PHP. AIT 616 Fall 2002 PHP  Special scripting language used to dynamically generate web documents  Open source – Free!!!  Performs.
Let’s Make An Form! Bonney Armstrong GD 444 Westwood College February 9, 2005.
INTERNET APPLICATION DEVELOPMENT For More visit:
Introduction to Perl Practical Extraction and Report Language or Pathologically Eclectic Rubbish Lister or …
2 1 Sending Data Using a Hyperlink CGI/Perl Programming By Diane Zak.
1 Python CIS*2450 Advanced Programming Concepts Material for this lecture was developed by Dr. D. Calvert.
Introduction to Programming the WWW I CMSC Summer 2004 Lecture 6.
10/5/2015CS346 PHP1 Module 1 Introduction to PHP.
Microsoft Internet Explorer and the Internet Using Microsoft Explorer 5.
FTP Server and FTP Commands By Nanda Ganesan, Ph.D. © Nanda Ganesan, All Rights Reserved.
DEV325 Deploying Visual Studio.NET Applications Billy Hollis Author / Consultant.
Topic 1: Welcome CSE2395/CSE3395 Perl Programming.
Linux Operations and Administration
1 System Administration Introduction to Scripting, Perl Session 3 – Sat 10 Nov 2007 References:  chapter 1, The Unix Programming Environment, Kernighan.
CGI Common Gateway Interface. CGI is the scheme to interface other programs to the Web Server.
Introduction to Perl Yupu Liang cbio at MSKCC
Introduction to PHP Advanced Database System Lab no.1.
Geog Basic Skills in Scientific Programming Syllabus, Introduction, Fundamentals of IDL Syntax.
1 Introduction to Perl CIS*2450 Advanced Programming Techniques.
Introduction to Perl “Practical Extraction and Report Language” “Pathologically Eclectic Rubbish Lister”
General rules 1. Rule: 2. Rule: 3. Rule: 10. Rule: Ask questions ……………………. 11. Rule: I do not know your skill. If I tell you things you know, please stop.
©John Samuel 2008 Introduction to PHP. ©John Samuel 2008 Objectives At the end of this class the student will be able to; Create and run a simple php.
Perl COEN 351  Thomas Schwarz, S.J Perl Scripting Language Developed by Larry Wall 1987 to speed up system administration tasks. Design principles.
Introduction to Perl NICOLE VECERE. Background General Purpose Language ◦ Procedural, Functional, and Object-oriented Developed for text manipulation.
Creating Databases for Web applications Server side vs client side PHP basics Homework: Get your own versions of sending working: both html and Flash!
Introduction to Perl. What is Perl Perl is an interpreted language. This means you run it through an interpreter, not a compiler. Similar to shell script.
CSE S. Tanimoto Perl-Intro - 1 Perl Practical Extraction and Report Language Shell-level scripting language: Glue that ties together programs written.
Week Four Agenda Link of the week Review week three lab assignment This week’s expected outcomes Next lab assignment Break-out problems Upcoming deadlines.
Java Internet Café Internet Basics.
Perl Day 6. Multiline Strings Perl supports a mechanism to deal with multiple lines of text rather than having to add them one at a time Perl supports.
Dr. Sajib Datta CSE Spring 2016 INTERMEDIATE PROGRAMMING.
Java Internet Cafe Internet Basics. Introduction l The Java Internet Café has seven computers equipped with high-speed modems for you to use to access.
Lesson 10—Networking BASICS1 Networking BASICS The Internet and Its Tools Unit 3 Lesson 10.
Perl Subroutines User Input Perl on linux Forks and Pipes.
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.
Copyright 2001, ActiveState. Using perl with Zope Andy McKay, ActiveState Python 9 Conference.
1 CGI (Common Gateway Interface) CmpE 587 Emir Bayraktar Onur Bük.
Presented By Sushil K. Chaturvedi Assistant Professor SRCEM,Banmore 1.
1 April 14, Starting New Open Source Software Projects William Cohen NCSU CSC 591W April 14, 2008.
Perl A language for Systems and Network Administration and Management.
PERL.
Programming Basics Web Programming.
CSE1320 INTERMEDIATE PROGRAMMING
CSE1320 INTERMEDIATE PROGRAMMING
Perl for Bioinformatics
Introduction to Python
Perl Practical Extraction and Report Language
CSE1320 INTERMEDIATE PROGRAMMING
CSE1320 INTERMEDIATE PROGRAMMING
Perl Practical Extraction and Report Language
Perl Practical Extraction and Report Language
Presentation transcript:

An Overview of Perl A language for Systems and Network Administration and Management: An overview of the language

Systems and Network ManagementPerl — an Introduction2 Where do I get Perl? For Windows, go to download the installer For Linux: it will be already installed For other platforms: go to –This is a good source of other information about Perl

Systems and Network ManagementPerl — an Introduction3 Where do I get Info about Perl? Web sites: – – – On your hard disk: –perldoc –f function Will look up the documentation for the built-in function (from the documentation perlfunc) –perldoc –q word Will look up word in the headings of the FAQ –perldoc perl A list of much of your locally installed documentation, divided into topics –ActiveState Perl provides a Programs menu item that links to online html documentation

Systems and Network ManagementPerl — an Introduction4 CPAN, PPM: Many Modules A very strong feature of Perl is the community that supports it There are tens of thousands of third party modules for many, many purposes: –Eg. Net::LDAP module supports all LDAP operations, Net::LWP provides a comprehensive web client Installation is easy: sudo perl –MCPAN –e shell install Net::LDAP Will check if a newer version is available on the Internet from CPAN, and if so, download it, compile it, test it, and if it passes tests, install it.

Systems and Network ManagementPerl — an Introduction5 PPM: Perl Package Manager For Windows Avoids need for a C compiler, other development tools Download precompiled modules from ActiveState and other sites, and install them: ppm install Net::LDAP See documentation with ActiveState Perl

Systems and Network ManagementPerl — an Introduction6 Mailing Lists: help from experts There are many mailing lists and newsgroups for Perl When subscribe to mailing list, receive all mail from list When send mail to list, all subscribers receive For Windows, many lists at

Systems and Network ManagementPerl — an Introduction7 How to ask Questions on a List I receive many questions from students about many topics Most questions are not clear enough to be able to answer in any way except, “please tell me more about your problem” Such questions sent to mailing lists are often unanswered Need to be concise, accurate, and clear –see also Eric Raymond's How to Ask Questions the Smart Way at Search the FAQs first

Systems and Network ManagementPerl — an Introduction8 Where is Perl on my system? ActiveState Perl installs perl.exe in C:\Perl\perl.exe Linux systems have a standard location for perl at /usr/bin/perl On some UNIX systems, it may be installed at /usr/local/bin/perl

Systems and Network ManagementPerl — an Introduction9 How does my OS know it’s a Perl program? To run your Perl program, OS needs to call perl How does OS know when to call Perl? Windows: –OS uses the extension of the file to decide what to do (e.g.,.bat,.exe ) –Your program names end with.pl Linux, Unix: –programs have execute permission ( chmod +x program ) –OS reads first 2 bytes of program: if they are “ #! ” then read to end of line, then use that as the interpreter –OS doesn’t care what your program file is called For cross platform support: –Put this at the top of all your programs: #! /usr/bin/perl –w Name your programs with an extension.pl

Language Overview A quick look at more important features of the language

Systems and Network ManagementPerl — an Introduction11 Funny Characters % Variables in Perl start with a funny character Why? No problem with reserved words: –can have a variable called $while, and another variable and a third called %while. Can interpolate value into a string: my $string = “long”; my $number = 42.42; print “my string is $string and my number is $number\n”;

Systems and Network ManagementPerl — an Introduction12 Arrays Define an array like this: = ( 1, 5, “fifteen” ); This is an array containing three elements The first can be accessed as $array[0], second as $array[1], the last as $array[2] Note that since each element is a scalar, it has the $ funny character for a scalar variable value In Perl, we seldom use an array with an index—use list processing array operations –higher level.

Systems and Network ManagementPerl — an Introduction13 Hashes Hashes are probably new to you Like an array, but indexed by a string Similar idea was implemented in java.lang.HashTable –Perl hashes are easier to use Example: my %hash = ( NL => 'Netherlands', BE => 'Belgium' ); This creates a hash with two elements first is $hash{NL}, has value “Netherlands”; second is $hash{BE} with value "Belgium"

Systems and Network ManagementPerl — an Introduction14 String Operations Perl has all the operators from C, in same precedence Has more operators for strings: Join strings with a dot, e.g. print "The sum of 3 and 4 is " "\n"; Quote special characters with a backslash, as in C print "\$value = $value\n"; Can quote all characters using single quotes: print 'output of $perl = "rapid";print $perl; is "rapid"'; Note that double quotes are okay in single quotes, single quotes okay in double quotes.

Systems and Network ManagementPerl — an Introduction15 See the perl summary The Perl summary on the subject web site provides…well, a good summary!