Perl Web Page – Just Enough Pepper. Web site Set up the top of your script to indicate perl and plain text #!/usr/bin/perl print "Content-type:text/plain\n\n";

Slides:



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

Adding Dynamic Content to your Web Site
Chapter 2—HTML Dreamweaver for College & Business.
CGI Programming.
CGI programming in Perl Learning Objectives: 1. To understand how a CGI program works in Perl and how to make it runnable in web browsers 2. To learn how.
JavaScript 101 Lesson 01: Writing Your First JavaScript.
Made by: Dan Ye. Introduction Basic Last Page ☆ HTML stands for Hyper Text Markup Language; ☆ HTML is not a programming language, it is a markup language;
PZ15A Programming Language design and Implementation -4th Edition Copyright©Prentice Hall, PZ15A - The Internet Programming Language Design and.
CM143 - Web Week 2 Basic HTML. Links and Image Tags.
CGI Programming in Perl Software Tools. Lecture 22 / Slide 2 CGI Programming l Last time we looked at designing a static web page. Today we will see how.
Defined/Undef my $i; if( defined $i ) #false $i=0; if( defined $i ) #true my %hash; #or %hash=(); defined %hash; #false, hash is empty $hash{“1”}=“one”;
CGI programming in Perl Learning Objectives: 1. To understand how a CGI program works in Perl and how to make it runnable in web browsers 2. To learn how.
WWW and Internet The Internet Creation of the Web Languages for document description Active web pages.
CGI Programming: Part 1. What is CGI? CGI = Common Gateway Interface Provides a standardized way for web browsers to: –Call programs on a server. –Pass.
COMPUTERS AND INFORMATION SYSTEMS HTML. How the Web Works To access a web site  Enter its address (URL) in the address box of your browser 
CGI Common Gateway Interface. CGI is the scheme to interface other programs to the Web Server.
Mr. Rouda’s CSCI 101 sections. What does a web page consist of? Code HTML, CSS, XHTML, XML, etc. Images Gif, jpg, png, etc. Plugins Swf, flv, etc. JavaScript.
1 HTML and CGI Scripting CSC8304 – Computing Environments for Bioinformatics - Lecture 10.
Student Learning Environment on the World Wide Web l CGI-programming in Perl for the connection of databases over the Internet. l Web authoring using Frontpage.
Mr. Rouda’s CSCI 101 sections. What does a web page consist of? Code HTML, CSS, XHTML, XML, etc. Images Gif, jpg, png, etc. Plugins Swf, flv, etc. JavaScript.
HTML. WHAT IS HTML HTML stands for Hyper Text Markup Language HTML is not a programming language, it is a markup language A markup language is a set of.
Python CGI programming
HTML CRASH COURSE. What is HTML?  Hyper Text Markup Language  The language used to make web pages  Written by using tags.
Section 17.1 Add an audio file using HTML Create a form using HTML Add text boxes using HTML Add radio buttons and check boxes using HTML Add a pull-down.
Computing Theory: HTML Year 11. Lesson Objective You will: o Be able to define what HTML is - ALL o Be able to write HTML code to create your own web.
15.1 Fundamentals of HTML.
Just Enough HTML How to Create Basic HTML Documents.
Building PERL Scripts on a Windows system* *and running those scripts on an Apache server!
HTML INTRODUCTION. What is HTML?  HTML stands for Hypertext Markup Language  Developed in 1990  Hidden code that helps us communicate with others on.
Basic HTML PowerPoint How Hyper Text Markup Language Works
12 1 Redirection CGI/Perl Programming By Diane Zak.
CGI Programming. What is "CGI"? Common Gateway Interface A means of running an executable program via the Web. CGI is not a Perl-specific concept. Almost.
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 © Copyright 2000 Ethel Schuster The Web… in 15 minutes Ethel Schuster
Intro to PHP IST2101. Review: HTML & Tags 2IST210.
HTML ( HYPER TEXT MARK UP LANGUAGE ). What is HTML HTML describes the content and format of web pages using tags. Ex. Title Tag: A title It’s the job.
15.1 Fundamentals of HTML DeKalb County School System.
Images Worksheet. Web template Download the template folder Unzip and save in your documents Rename the folder to “images work” without quotes.
Lecture Note 8: ASP Including Files and The Global.asa file.
Intermediate CGI & CGI.pm Webmaster II - Fort Collins, CO Copyright © XTR Systems, LLC CGI Programming & The CGI.pm Perl Module Instructor: Joseph DiVerdi,
The Teacher Computing HTML HyperText Markup Language.
Accessing the Lab. Putty Available via links on course page Creates secure (SSH) command line session between your machine and SCS network Uses tunnelling.
15.1 Fundamentals of HTML 2 assignments: 1st—complete the worksheet. 2nd—create your first HTML web page following the directions in this PowerPoint where.
 2001 Prentice Hall, Inc. All rights reserved. Chapter 7 - Introduction to Common Gateway Interface (CGI) Outline 7.1Introduction 7.2A Simple HTTP Transaction.
1 After completing this lesson, you will be able to: Get around the Internet with your browser. Connect to the Internet. Print Web pages. Save Web pages.
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 Programming Overview. Introduction HTML is limited - it cannot manipulate data How Web pages are extended (include): –Java: an object-oriented programming.
This shows CIS17 and the first day introduction..
Getting Started with HTML. HTML  Hyper Text Markup Language  HTML isn’t a program language, its known as a markup language  A Markup language has tags.
1111 Creating HTML Programatically Objectives You will be able to Invoke C# code on the server from an ASP.NET page. Write C# code to create HTML.
ASP Syntax Y.-H. Chen International College Ming-Chuan University Fall, 2004.
HTML rev 01/09/2016 Hyper Text Markup Language. HTML -history  Hypertext Markup Language is the main language for creating web pages . It was first.
1 CSC160 Chapter 1: Introduction to JavaScript Chapter 2: Placing JavaScript in an HTML File.
HTML. Hyper Text Markup Language Markup your text document The markup is the tag Hyper text means you can jump from place to place Programming language.
HTML Tutorial. What is HTML HTML is a markup language for describing web documents (web pages) HTML documents are described by HTML tags Each HTML tag.
HTML is the language that allows text and graphics to be displayed as Web pages. It is a set of special codes, called tags, that tells a browser application.
Sending data with CGI/Perl Please use speaker notes for additional information!
1 The Internet Programming Language Design and Implementation (4th Edition) by T. Pratt and M. Zelkowitz Prentice Hall, 2001 Section
University of Kansas Department of Electrical Engineering and Computer Science Dr. Susan Gauch April 21, 2005 I T T C Introduction to Web Technologies.
CGI, FORMS and Perl CSC 3750 Fall
CS120 The Information Era TOPICS: CGI-Scripts 4/18/05
CGI I: Basics Web Programming.
Hyper Text Markup Language
Section 17.1 Section 17.2 Add an audio file using HTML
Insert Presentation Title Here Insert Presentation Summary Here
HTML.
Perl Database – Just Enough
Perl Web Page – Just Enough
CGI I: Basics Web Programming.
For the CIS17 course..
Presentation transcript:

Perl Web Page – Just Enough Pepper

Web site Set up the top of your script to indicate perl and plain text #!/usr/bin/perl print "Content-type:text/plain\n\n"; You can put html tags which the browser will understand, or not Ensure that others can read and execute: – chmod o+rx yourfile.pl Web address – – Must be under public_html

HelloWorld perl on internet Print HTML code to the browser: #!/usr/bin/perl print "Content-type:text/plain\n\n"; print "content-type:text/html; charset=utf-8\n\n"; print "hello world!";

HelloWorld perl on internet Print HTML code to the browser more cleanly: #!/usr/bin/perl print "Content-type:text/plain\n\n"; print "content-type:text/html; charset=utf-8\n\n print <<ENDHTML; CGI Test Hello World! Click Here ENDHTML

Taking in parms Use an html form to prompt for input Change our script to use CGI Print out a form section of html that will run your own script Retrieve from the the search word from the form

Script changes to retrieve results print "content-type:text/html; charset=utf-8\n\n"; use strict; use CGI qw/:standard/; my $search = param("input")||""; print qq( What is the search word: ); if ($search) { print qq( the search word is $search ); yourpage(); } print qq( ); sub yourpage { print "do whatever you want in your page here "; print "and you can use $search "; print "\n does nothing "; print "and you need to but br inside angle brackets to get the tne next line "; }

Summary Web Create a perl script that uses a preset search word input form Insert your code inside the yourpage method – Read your files – Display your results Place script in public_html Set permissions (chmod o+rx your script.pl) Run as /