:::::::::::::: cgi1i.pl :::::::::::::: #!/usr/bin/perl ############################################################################ ### Author: ++++ xxxx. ++++ ### File Name: cgi1.pl ### Purpose: Demonstrate server-side programming. ### Versions: my $ver="1.0"; ### 1.0 bam/2418 Output some HTML. ############################################################################# use strict; use CGI qw/:standard/; $| = 1; print header; # html format is permitted to output. print "\n\n\n"; #### Get form parameters from URL. my %in_para; foreach (param()){ $in_para{$_} = join " ", param($_); # Multiple-values (checkbox) joined with blanks. } my $a=$in_para{a}; my $b=$in_para{b}; my $c=$in_para{c}; ## Allowable characters only. $a =~ s|[^-A-Za-z0-9_/.]|_|g; $b =~ s|[^-A-Za-z0-9_/.]|_|g; $c =~ s|[^-A-Za-z0-9_/.]|_|g; ######## PATHS & FILENAMES ######## my $pwd= `pwd;`; my $ppwd= `cd ..; pwd;`; # Parent directory. my $sub= `cd ..; basename \`pwd\` `; chop $sub; #### Set prefix to path. #### my $name = $ENV { 'COMPUTERNAME' } ; my $prepath = "../.."; #### Useful strings. # my $Q = '"'; # my $TAB= " "; my $NBSP= " "; my $SP4= "    "; #### Main processing. #### # print " Demonstrate CGI programming --- $a $b $c \n"; print "\n"; print "

Demonstrate CGI programming --- $a $b $c

\n"; if ($a gt $b) { print "

The first string is greater."; } elsif ($a lt $b) { print "

The second string is greater."; } else { print "

The strings are equal."; } print "


\n"; print " GO back to the form. \n"; print "\n"; print "\n"; exit; :::::::::::::: cgi1.pl :::::::::::::: #!/usr/bin/perl ############################################################################ ### Author: ++++ xxxx. ++++ ### File Name: cgi1.pl ### Purpose: Demonstrate server-side programming. ### Versions: my $ver="1.0"; ### 1.0 bam/2418 Output some HTML. ############################################################################# use strict; use CGI qw/:standard/; $| = 1; print header; # html format is permitted to output. print "\n\n\n"; #### Get form parameters from URL. my %in_para; foreach (param()){ $in_para{$_} = join " ", param($_); # Multiple-values (checkbox) joined with blanks. } my $a=$in_para{a}; my $b=$in_para{b}; my $c=$in_para{c}; ## Allowable characters only. $a =~ s|[^-A-Za-z0-9_/.]|_|g; $b =~ s|[^-A-Za-z0-9_/.]|_|g; $c =~ s|[^-A-Za-z0-9_/.]|_|g; ######## PATHS & FILENAMES ######## my $pwd= `pwd;`; my $ppwd= `cd ..; pwd;`; # Parent directory. my $sub= `cd ..; basename \`pwd\` `; chop $sub; #### Set prefix to path. #### my $name = $ENV { 'COMPUTERNAME' } ; my $prepath = "../.."; #### Useful strings. # my $Q = '"'; # my $TAB= " "; my $NBSP= " "; my $SP4= "    "; #### Main processing. #### # print " Demonstrate CGI programming --- $a $b $c \n"; print "\n"; print "

Demonstrate CGI programming --- $a $b $c

\n"; if ($a gt $b) { print "

The first string is greater."; } elsif ($a lt $b) { print "

The second string is greater."; } else { print "

The strings are equal."; } print "


\n"; print " GO back to the form. \n"; print "\n"; print "\n"; exit; :::::::::::::: cgi2.pl :::::::::::::: #!/usr/bin/perl ############################################################################ ### Author: YOUR NAME ### File Name: cgi1.pl ### Purpose: Demonstrate server-side programming. ### Versions: my $ver="1.0"; ### 1.0 bam/2418 Output some HTML. ############################################################################# use strict; use CGI qw/:standard/; $| = 1; print header; # html format is permitted to output. print "\n\n\n"; #### Get form parameters from URL. my %in_para; foreach (param()){ $in_para{$_} = join " ", param($_); # Multiple-values (checkbox) joined with blanks. } my $a=$in_para{a}; my $b=$in_para{b}; my $c=$in_para{c}; ## Allowable characters only. $a =~ s|[^-A-Za-z0-9_/.]|_|g; $b =~ s|[^-A-Za-z0-9_/.]|_|g; $c =~ s|[^-A-Za-z0-9_/.]|_|g; ######## PATHS & FILENAMES ######## my $pwd= `pwd;`; my $ppwd= `cd ..; pwd;`; # Parent directory. my $sub= `cd ..; basename \`pwd\` `; chop $sub; #### Set prefix to path. #### my $name = $ENV { 'COMPUTERNAME' } ; my $prepath = "../.."; #### Useful strings. # my $Q = '"'; # my $TAB= " "; my $NBSP= " "; my $SP4= "    "; #### Main processing. #### # print " MYNAME -- demonstrate CGI programming --- $a $b $c \n"; print "\n"; print "

MYNAME -- demonstrates CGI programming --- $a $b $c

\n"; if ($a gt $b) { print "

The first string is greater."; } elsif ($a lt $b) { print "

The second string is greater."; } else { print "

The strings are equal."; } print "


\n"; print " GO back to the form. \n"; print "\n"; print "\n"; exit; :::::::::::::: ok.pl :::::::::::::: #!/usr/bin/perl ############################################################################ ### Author: ++++ xxxx. ++++ ### File Name: cgi1.pl ### Purpose: Demonstrate server-side programming. ### Versions: my $ver="1.0"; ### 1.0 bam/2418 Output some HTML. ############################################################################# use strict; use CGI qw/:standard/; $| = 1; print header; # html format is permitted to output. print "\n\n\n"; #### Get form parameters from URL. my %in_para; foreach (param()){ $in_para{$_} = join " ", param($_); # Multiple-values (checkbox) joined with blanks. } my $a=$in_para{a}; my $b=$in_para{b}; my $c=$in_para{c}; ## Allowable characters only. $a =~ s|[^-A-Za-z0-9_/.]|_|g; $b =~ s|[^-A-Za-z0-9_/.]|_|g; $c =~ s|[^-A-Za-z0-9_/.]|_|g; ######## PATHS & FILENAMES ######## my $pwd= `pwd;`; my $ppwd= `cd ..; pwd;`; # Parent directory. my $sub= `cd ..; basename \`pwd\` `; chop $sub; #### Set prefix to path. #### my $name = $ENV { 'COMPUTERNAME' } ; my $prepath = "../.."; #### Useful strings. # my $Q = '"'; # my $TAB= " "; my $NBSP= " "; my $SP4= "    "; #### Main processing. #### # print " Demonstrate CGI programming --- $a $b $c \n"; print "\n"; print "

Demonstrate CGI programming --- $a $b $c

\n"; if ($a gt $b) { print "

The first string is greater."; } elsif ($a lt $b) { print "

The second string is greater."; } else { print "

The strings are equal."; } print "


\n"; print " GO back to the form. \n"; print "\n"; print "\n"; exit; :::::::::::::: perl.pl :::::::::::::: #!/usr/bin/perl :::::::::::::: xcgi1.pl :::::::::::::: #!/usr/bin/perl ############################################################################ ### Author: ++++ YOUR NAME HERE ++++ ### File Name: cgi1.pl ### Purpose: Demonstrate server-side programming. ### Versions: my $ver="1.0"; ### 1.0 bam/2418 Output some HTML. ############################################################################# use strict; use CGI qw/:standard/; $| = 1; print header; # html format is permitted to output. print "\n\n\n"; #### Get form parameters from URL. my %in_para; foreach (param()){ $in_para{$_} = join " ", param($_); # Multiple-values (checkbox) joined with blanks. } my $a=$in_para{a}; my $b=$in_para{b}; my $c=$in_para{c}; ## Allowable characters only. $a =~ s|[^-A-Za-z0-9_/.]|_|g; $b =~ s|[^-A-Za-z0-9_/.]|_|g; $c =~ s|[^-A-Za-z0-9_/.]|_|g; ######## PATHS & FILENAMES ######## my $pwd= `pwd;`; my $ppwd= `cd ..; pwd;`; # Parent directory. my $sub= `cd ..; basename \`pwd\` `; chop $sub; #### Set prefix to path. #### my $name = $ENV { 'COMPUTERNAME' } ; my $prepath = "../.."; #### Useful strings. # my $Q = '"'; # my $TAB= " "; my $NBSP= " "; my $SP4= "    "; #### Main processing. #### # print " Demonstrate CGI programming: $a $b $c . \n"; print "\n"; print "

Demonstrate CGI programming: $a $b $c .

\n"; if ($a gt $b) { print "

The first string is greater."; } elsif ($a lt $b) { print "

The second string is greater."; } else { print "

The strings are equal."; } print "


\n"; print " GO back to the form. \n"; print "\n"; print "\n"; exit; :::::::::::::: ycgi1.pl :::::::::::::: #!/usr/bin/perl ############################################################################ ### Author: ++++ YOUR NAME HERE ++++ ### File Name: cgi1.pl ### Purpose: Demonstrate server-side programming. ### Versions: my $ver="1.0"; ### 1.0 bam/2418 Output some HTML. ############################################################################# use strict; use CGI qw/:standard/; $| = 1; print header; # html format is permitted to output. print "\n\n\n"; #### Get form parameters from URL. my %in_para; foreach (param()){ $in_para{$_} = join " ", param($_); # Multiple-values (checkbox) joined with blanks. } my $a=$in_para{a}; my $b=$in_para{b}; my $c=$in_para{c}; ## Allowable characters only. $a =~ s|[^-A-Za-z0-9_/.]|_|g; $b =~ s|[^-A-Za-z0-9_/.]|_|g; $c =~ s|[^-A-Za-z0-9_/.]|_|g; ######## PATHS & FILENAMES ######## my $pwd= `pwd;`; my $ppwd= `cd ..; pwd;`; # Parent directory. my $sub= `cd ..; basename \`pwd\` `; chop $sub; #### Set prefix to path. #### my $name = $ENV { 'COMPUTERNAME' } ; my $prepath = "../.."; #### Useful strings. # my $Q = '"'; # my $TAB= " "; my $NBSP= " "; my $SP4= "    "; #### Main processing. #### # print " Demonstrate CGI programming: $a $b $c . \n"; print "\n"; print "

Demonstrate CGI programming: $a $b $c .

\n"; if ($a gt $b) { print "

The first string is greater."; } elsif ($a lt $b) { print "

The second string is greater."; } else { print "

The strings are equal."; } print "


\n"; print " GO back to the form. \n"; print "\n"; print "\n"; exit;