Defined/Undef - PowerPoint PPT Presentation

About This Presentation
Title:

Defined/Undef

Description:

input type=submit value='search' /form ... Two ways to submit information: HTML form. With URL. CGI - Simple script #!/usr/bin/perl ... – PowerPoint PPT presentation

Number of Views:49
Avg rating:3.0/5.0
Slides: 10
Provided by: maxsh
Category:
Tags: com | defined | href | submit | true | undef | url

less

Transcript and Presenter's Notes

Title: Defined/Undef


1
Defined/Undef
my hash or hash() defined hash false,
hash is empty hash1one exists(hash1
)defined(hash1)true undef
hash1 exists(hash1)
false defined(hash1)true delete
hash1 exists(hash1)
false defined(hash1)false
my i if( defined i ) false i0 if(
defined i ) true
2
Basic HTML
ltHTMLgt ltHEADgt ltTITLEgtDocument Titlelt/TITLEgt
lt/HEADgt ltBODYgt Hello World! lt/BODYgt lt/HTMLgt
3
File Names
www.nonocnn.com/ www.nonocnn.com/some/ Webserver
displays a default (in most cases)
file index.html if it doesnt exist then all
files in that directory are listed. To protect
server information, usually this option (file
listing) is switched off.
4
ltpgt Paragraph ltpgt Next Paragraph. And line ltbrgt
break. ltpgt Unordered List (UL) ltULgt ltLIgt We
Love Perl. ltLIgt We Love Perl ltbgt IN BOLD lt/bgt
ltLIgt ltigt We Loooove Perl lt/igt ltLIgt Now, We
Love HTML Too! lt/ULgt Horizontal rule
(HR) ltHRgt ltpgt Ordered List (OL) ltOLgt ltLIgt
We Love Perl. ltLIgt We Love Perl ltbgt IN BOLD
lt/bgt ltLIgt ltigt We Loooove Perl lt/igt ltLIgt
Now, We Love HTML Too! lt/OLgt
5
ltA HREF"http//www.cs.tau.ac.il/"gt Link To
www.cs.tau.ac.il lt/Agt ltpgt Images ltimg
src"http//www.cs.tau.ac.il/images/tau.jpg"gt ltp
gt ltfont colorbluegt Image Options lt/fontgt ltimg
src"http//www.cs.tau.ac.il/images/tau.jpg"
width"102" height"49" border3
COLOR"FFFFCC"gt ltpgt Tables lttablegt lttrgt
lttdgt ltfont colorredgt Cell 1.1 lt/fontgt
lt/tdgt lttdgt Cell 1.2 lt/tdgt lt/trgt lttrgt lttdgt
Cell 2.1 lt/tdgt lttdgt ltfont colorcyangt Cell 2.2
lt/fontgt lt/tdgt lt/trgt lt/tablegt
6
ltpgt Table Options lttable aligncenter border5
cellspacing10 cellpadding20gt lttrgt lttd
alignleftgt ltfont colorredgt Cell-----------------
---1.1 lt/fontgt lt/tdgt lttdgt Cell-------------------
-1.2 lt/tdgt lt/trgt lttrgt lttdgt Cell---------------
-----2.1 lt/tdgt lttdgt ltfont colorcyangt
Cell--------------------2.2 lt/fontgt lt/tdgt lt/trgt
lttrgt lttd alignleftgt Aligned left lt/tdgt lttd
alignrightgt Aligned right lt/tdgt lt/trgt lt/tablegt
7
CGI - Common Gateway Interface
  • CGI a standard that defines the protocol
    between a web server and a application (script).

http/ ssl
Web Browser
Web Server
DB
CGI
Application
search example
8
Sending information to CGI
  • Two ways to submit information
  • HTML form
  • With URL

ltform action"/cgi-bin/scilib.pl"
methodPOSTgt ltinput typetext namesearchj
value""gt ltinput typesubmit value"search"gt lt/for
mgt
http//www.tau.ac.il/cgi-bin/scilib.pl?searchjpro
tein
9
CGI - Simple script
!/usr/bin/perl use CGI qw(standard) print
header param param('formtext') print
"lthrgtltp alignleftgtHello CGI param" print
end_html
Write a Comment
User Comments (0)
About PowerShow.com