What is Perl? PERL--Practical Extraction and Report Language

Slides:



Advertisements
Similar presentations
1 Copyright © 2002 Pearson Education, Inc.. 2 Chapter 1 Introduction to Perl and CGI.
Advertisements

JavaScript FaaDoOEngineers.com FaaDoOEngineers.com.
Adding Dynamic Content to your Web Site
DT228/3 Web Development WWW and Client server model.
Browsers and Servers CGI Processing Model ( Common Gateway Interface ) © Norman White, 2013.
ASP Tutorial. What is ASP? ASP (Active Server Pages) is a Microsoft technology that enables you to make dynamic and interactive web pages. –ASP usually.
15 Chapter 15 Web Database Development Database Systems: Design, Implementation, and Management, Fifth Edition, Rob and Coronel.
B.Sc. Multimedia ComputingMedia Technologies Database Technologies.
Introduction to Active Server Pages
Multiple Tiers in Action
Programming Introduction November 9 Unit 7. What is Programming? Besides being a huge industry? Programming is the process used to write computer programs.
2440: 141 Web Site Administration Web Server-Side Programming Professor: Enoch E. Damson.
1 CS428 Web Engineering Lecture 18 Introduction (PHP - I)
Server Side Scripting Norman White. Where do we do processing? Client side – Javascript (embed code in html) – Java applets (send java program to run.
Intro to PHP Introduction to server-side scripts (It’s all good :D) © TAFE NSW
1 Homework / Exam Exam 3 –Solutions Posted –Questions? HW8 due next class Final Exam –See posted schedule Websites on UNIX systems Course Evaluations.
Server- Side technologies Client-side vs. Server-side scripts PHP basic ASP.NET basic ColdFusion.
Lecture Note 3: ASP Syntax.  ASP Syntax  ASP Syntax ASP Code is Browser-Independent. You cannot view the ASP source code by selecting "View source"
Dynamic Web Sites Chris North cs3724: HCI. Presentations matt ketner, sam altman, mike gordon Vote: UI Hall of Fame/Shame?
Basics of Web Databases With the advent of Web database technology, Web pages are no longer static, but dynamic with connection to a back-end database.
IDK0040 Võrgurakendused I harjutus 06: PHP: Introduction Deniss Kumlander.
Introduction to Programming the WWW I CMSC Summer 2004 Lecture 6.
20-753: Fundamentals of Web Programming 1 Lecture 1: Introduction Fundamentals of Web Programming Lecture 1: Introduction.
HTML. Principle of Programming  Interface with PC 2 English Japanese Chinese Machine Code Compiler / Interpreter C++ Perl Assembler Machine Code.
Java CGI Lecture notes by Theodoros Anagnostopoulos.
ASP Introduction Y.-H. Chen International College Ming-Chuan University Fall, 2004.
Website Development with PHP and MySQL Saving Data.
Chapter Nine Perl and CGI Programming. 2 Objectives Basic features of Perl language Set up an HTML Web page Use Perl and CGI scripts to make your web.
1 © Netskills Quality Internet Training, University of Newcastle HTML Forms © Netskills, Quality Internet Training, University of Newcastle Netskills is.
CGI Common Gateway Interface. CGI is the scheme to interface other programs to the Web Server.
CS 4720 Dynamic Web Applications CS 4720 – Web & Mobile Systems.
CGI vs ASP. CGI Model request Sends CGI to runs the script and returns HTML sends HTML back Script is stored in the script server.
CS 111 – Oct. 4 Web design –HTML –Javascript Commitment: –This week, read sections 4.3 – 4.5.
ASP (Active Server Pages) by Bülent & Resul. Presentation Outline Introduction What is an ASP file? How does ASP work? What can ASP do? Differences Between.
IS-907 Java EE World Wide Web - Overview. World Wide Web - History Tim Berners-Lee, CERN, 1990 Enable researchers to share information: Remote Access.
Module: Software Engineering of Web Applications Chapter 2: Technologies 1.
HTML Overview Part 5 – JavaScript 1. Scripts 2  Scripts are used to add dynamic content to a web page.  Scripts consist of a list of commands that execute.
Form Processing Week Four. Form Processing Concepts The principal tool used to process Web forms stored on UNIX servers is a CGI (Common Gateway Interface)
ASP. ASP is a powerful tool for making dynamic and interactive Web pages An ASP file can contain text, HTML tags and scripts. Scripts in an ASP file are.
 Web pages originally static  Page is delivered exactly as stored on server  Same information displayed for all users, from all contexts  Dynamic.
Web Programming Overview. Introduction HTML is limited - it cannot manipulate data How Web pages are extended (include): –Java: an object-oriented programming.
Invitation to Computer Science 6 th Edition Chapter 10 The Tower of Babel.
Beginning JavaScript 4 th Edition. Chapter 1 Introduction to JavaScript and the Web.
1 CSC160 Chapter 1: Introduction to JavaScript Chapter 2: Placing JavaScript in an HTML File.
1 Chapter 1 INTRODUCTION TO WEB. 2 Objectives In this chapter, you will: Become familiar with the architecture of the World Wide Web Learn about communication.
Module 1 Introduction to JavaScript
Distributed Control and Measurement via the Internet
Tonga Institute of Higher Education IT 141: Information Systems
CS 330 Class 7 Comments on Exam Programming plan for today:
Section 6.3 Server-side Scripting
Active Server Pages Computer Science 40S.
Section 17.1 Section 17.2 Add an audio file using HTML
Introduction to Programming the WWW I
Programming Concepts and Languages
PHP / MySQL Introduction
Database Driven Websites
Introduction to JavaScript
Chapter 27 WWW and HTTP.
Tonga Institute of Higher Education IT 141: Information Systems
Introduction to JavaScript
JavaScript.
Tonga Institute of Higher Education IT 141: Information Systems
IntroductionToPHP Static vs. Dynamic websites
Intro to PHP.
CIS 133 mashup Javascript, jQuery and XML
Tutorial 10: Programming with javascript
World Wide Web Components
An Example of a TCP/IP Application: the World Wide Web
Introduction to JavaScript
Web Application Development Using PHP
Presentation transcript:

What is Perl? PERL--Practical Extraction and Report Language Created as a way to process large text or files. Create a script that opens one or more files Processes the information Writes out results

WWW functionality Communication with web servers through CGI Perl takes input from a web form channels through the server and “does something with it.”

What can it do? Perl can be used quite flexibly to “do something” with user input append to a flat file add it to a database insert it into an email message add it to an existing webpage create a new webpage display it in the browser’s window

Most impressive! A new webpage can be created “on the fly” in response to user input a thank you message a confirmation page a follow-up query information returned from a database query Web interactivity!

Informations in Perl Online documentation on Perl Books on Perl http://mis2.myongji.ac.kr/~shpark/2000Fall/system/perl/perl.htm http://www.perl.com/ http://reference.perl.com/ follow a tutorial hyperlink Books on Perl Learning Perl from O’Reilly & Associates Series on Perl from O’Reilly & Associates

Perl Examples I Create a first Perl program, “first.pl” #!/usr/local/bin/perl print “Hello, World\n”; chmod 755 first.pl ./first.pl

Perl Example II Variables and Input Commands #!/usr/local/bin/perl $name="HAL"; print "Hello there. What is your name?\n"; $you = <STDIN>; chop($you); print "Hello, $you. My name is $name. Welcome to the CGI Class.\n"; There is no type in $variable_name

Perl Example III Perl CGI program has to handle HTML !! #!/usr/local/bin/perl print "Content-type:text/html\n\n"; print "<html><head><title>Test Page</title></head>"; print "<body>"; print "<h2>Hello, world!</h2>"; print "</body></html>"; This handles HTML output only, how about input? --> needs HTML FORM

Program vs. Script A program is a complex set of instructions, compiled in an efficient binary format for a given platform. A script is a set of instructions that is not compiled, but is left in plain text format. Needs an interpreter to execute.

Alternatives C, Visual Basic ASP(Active Server Page) Java JavaScript, VBScript Cold Fusion

What You Need to Make It Work A script Perl software A web form A web server

Key Elements In the context of a web application, a script is just a series of instructions that tell the computer how to “do something with” the information a user provides. The “do something” is the “action.” Can be simple or elaborate

Structure of Perl CGI Script 1. Setup 2. Parse 3. Process the Input 4. Show the results

Simple, but Effective Perl is a relatively simple way to handle the output from HTML forms via CGI. Not the most efficient, but is the most commonly used for simple applications that do not get a high volume of user traffic and do not require sophisticated database processing and query.