ECMM6018 Enterprise Networking For Electronic Commerce Tutorial 5 Server Side Scripting Perl.

Slides:



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

AP Computer Science Anthony Keen. Computer 101 What happens when you turn a computer on? –BIOS tries to start a system loader –A system loader tries to.
ECMM6018 Enterprise Networking For Electronic Commerce Tutorial 4 Client Side Scripting JavaScript Looping.
A Guide to Unix Using Linux Fourth Edition
Chapter 41 Variables and JSP Control Structures JavaServer Pages By Xue Bai.
● Perl reference
CS311 – Today's class Perl – Practical Extraction Report Language. Assignment 2 discussion Lecture 071CS Operating Systems I.
What is CGI? The Common Gateway Interface (CGI) is a mechanism that allows Web clients to execute programs on a Web server and to receive their output.
CS 1 with Robots Variables, Data Types & Math Institute for Personal Robots in Education (IPRE)‏
Operators. Perl has MANY operators. –Covered in Chapter 3 of Prog.Perl Most operators have numeric and string version –remember Perl will convert variable.
20-753: Fundamentals of Web Programming Copyright © 1999, Carnegie Mellon. All Rights Reserved. 1 Lecture 8: Perl Basics Fundamentals of Web Programming.
ALBERT WAVERING BOBBY SENG. Week Whatever: PHP  Announcements/questions/complaints.
PHP MOHAMMED SHURRAB TO MISS/ RASHA ATTALLAH. What is PHP? Stands for "PHP Hypertext Preprocessor" Server-side scripting language HTML-embedded Supports.
Practical Extraction & Report Language PERL Joseph Beltran.
Introduction to Perl & BioPerl Dr G. P. S. Raghava Bioinformatics Centre Bioinformatics Centre IMTECH, Chandigarh Web:
1 Perl Perl basics Perl Elements Arrays and Hashes Control statements Operators OOP in Perl.
 For Loops › for (variable set; condition; incremental or decrement){ // loop beginning › } // loop end  While loops › while (condition) { // beginning.
2440: 211 Interactive Web Programming Expressions & Operators.
Chapter 3: Data Types and Operators JavaScript - Introductory.
1 Working with Data Types and Operators. 2 Using Variables and Constants The values stored in computer memory are called variables The values, or data,
C Programming n General Information on C n Data Types n Arithmetic Operators n Relational Operators n if, if-else, for, while by Kulapan Waranyuwat.
4 1 Array and Hash Variables CGI/Perl Programming By Diane Zak.
Perl By Gabe and Ted. History Perl was created by Larry Wall while working at NASA’s Jet Propulsion Labs. Larry Wall also created patch which is in widespread.
Introduction to PHP A user navigates in her browser to a page that ends with a.php extension The request is sent to a web server, which directs the request.
Open Source Software Unit – 3 Presented By Mr. R.Aravindhan.
Perl Practical(?)‏ Extraction and Report Language.
PHP Teresa Worner. What is it? PHP: Hypertext Preprocessor server-side scripting language open source cross-platform compatible with almost all servers.php.php3.phtml.
Perl Language Yize Chen CS354. History Perl was designed by Larry Wall in 1987 as a text processing language Perl has revised several times and becomes.
Code Grammar. Syntax A set of rules that defines the combination of symbols and expressions.
Chapter 9: Perl Programming Practical Extraction and Report Language Some materials are taken from Sams Teach Yourself Perl 5 in 21 Days, Second Edition.
3 1 Sending Data Using an Online Form CGI/Perl Programming By Diane Zak.
PERL Ronald L. Ramos Proglan. What is PERL? Perl stands for Practical Extraction and Reporting Language. (or Pathologically Eclectic Rubbish Lister).
Prof. Alfred J Bird, Ph.D., NBCT Office – McCormick 3rd floor 607 Office Hours – Tuesday and.
Computer Programming for Biologists Class 3 Nov 13 th, 2014 Karsten Hokamp
5 1 Data Files CGI/Perl Programming By Diane Zak.
Introduction to Perl William G. Dishman CUR/516 November 5, 2014.
Perl Tutorial. Why PERL ??? Practical extraction and report language Similar to shell script but lot easier and more powerful Easy availablity All details.
CPTG286K Programming - Perl Chapter 4: Control Structures.
ECMM6018 Enterprise Networking for Electronic Commerce Tutorial 7
More Perl Data Types Scalar: it may be a number, a character string, or a reference to another data type. -the sigil $ is used to denote a scalar(or reference)
Department of Electrical and Computer Engineering Introduction to Perl By Hector M Lugo-Cordero August 26, 2008.
 In computer programming, a loop is a sequence of instruction s that is continually repeated until a certain condition is reached.  PHP Loops :  In.
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.
Perl Variables: Array Web Programming1. Review: Perl Variables Scalar ► e.g. $var1 = “Mary”; $var2= 1; ► holds number, character, string Array ► e.g.
Open Source Server Side Scripting ECA 236 Open Source Server Side Scripting PHP Basics.
PYTHON VARIABLES : CHAPTER 2 FROM THINK PYTHON HOW TO THINK LIKE A COMPUTER SCIENTIST.
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.
C Language 1 Program Looping. C Language2 Topics Program looping Program looping Relational operators / expressions Relational operators / expressions.
Java Basics. Tokens: 1.Keywords int test12 = 10, i; int TEst12 = 20; Int keyword is used to declare integer variables All Key words are lower case java.
The Scripting Programming Language
Dr. Abdullah Almutairi Spring PHP is a server scripting language, and a powerful tool for making dynamic and interactive Web pages. PHP is a widely-used,
Operators. Perl has MANY operators. –Covered in Chapter 3 of Camel –perldoc perlop Many operators have numeric and string version –remember Perl will.
PHP Tutorial. What is PHP PHP is a server scripting language, and a powerful tool for making dynamic and interactive Web pages.
7 - Programming 7J, K, L, M, N, O – Handling Data.
PHP using MySQL Database for Web Development (part II)
CIIT-Human Computer Interaction-CSC456-Fall-2015-Mr
An Introduction to Perl – Part I
Control Structures: if Conditional
Control Structures: for & while Loops
Chapter (3) - Looping Questions.
PHP.
Logical Operations In Matlab.
Variables, Data Types & Math
The Data Element.
Relational Operators.
The Selection Structure
The Data Element.
INTRODUCTION to PERL PART 1.
Karan Thaker CS 265 Section 001
Presentation transcript:

ECMM6018 Enterprise Networking For Electronic Commerce Tutorial 5 Server Side Scripting Perl

What is it Server Side Language Cgi application resides in the /cgi-bin directory #! /opt/bin/perl Use CGI qw(:standard) ASP, JSP

Variable Types in Perl Scalar variable : Scalar variables used to contain strings, integer Numbers and floating point numbers (decimals) e.g. $varname Indexed array: A variable that can store different scalar values,e.g. numbers, decimals accessed $arrayname[i] Associative array: elements of an associative array are referred to as "key" and "value" pairs e.g. %array accessed $array{key} = pair Variable names should be restricted to just letters of the alphabet, i.e. leave out characters such as #, $, %, ^, &, *, (, ), ~

Mathematical Operators + Addition - Subtraction * Multiplication / Division ++ Adds one to the value on the left, i.e. j++, j=j+1 -- Subtracts one from the value on the left j--, j= j-1

Assignment Operators = Assigns what is on the right side to what is on the left e.g. a=3 += Adds the value of the right side to the left side and makes the variable on the left equal to it. e.g. a +=3, a=a+3 -= Subtracts the value of the right side to the left side and makes the variable on the left equal to it. e.g. a-=3, a=a-3

Comparison Operators < > <= >= == eq != Ne =~

Conditional Statement If If – Else If (condition) { statement } e.g. if ($a!=5) { print “Answer is not 5\n”; }

Conditional Statement If-Else If (condition) statement Else statement e.g. if ($a!=5) { print “Answer is not 5\n”; } else print “Answer is 5\n”;

Conditional Statement if ($stuff < 5) { print “short!\n"; } elsif ($stuff >= 6) { print “tall!\n"; } else { print “in between\n"; }

Looping While For Foreach

While Statement while (condition) { code to be executed } e.g. while ($stuff <6) { print “$stuff\n”; $stuff++; }

For Statement for (initialization; test condition; increment) { code to be executed } for ($i = 0; $i <= $#stuff; $i++) { print "$stuff[$i]"; }

For Each Statement foreach $slotspace { print "$slotspace"; } foreach $slotname (keys (%stuff)) { print "$stuff{$slotname}"; }