[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [MacPerl] perl line pls




you folks have been so kind...the original snippet was taken a bit out of
context...if you feel so inclined here is the whole cgi script..pls free
free to comment away...again..thanks all...u-r-great!

#!/usr/bin/perl -w
 #Author: Hann So http://voyager.atc.fhda.edu/~hso
 #Translator
 require("cgi-lib.pl"); 
 
 %hi = (
 "english", "Hello",
 "french", "Bonjour",
 "spanish", "Hola"
 );
 
 %how = (
  "english", "How are you?",
  "french", "Comment allez vous?",
  "spanish", "Que tal?",
 );
 
 #Read in the variables
 &ReadParse(*input);
 
#Print the header
 print &PrintHeader;
 print &HtmlTop ("Translator");

 print  "<blockquote>\n$hi{$input{'language'}}, $input{'name'}.
 $how{$input{'language'}}?\n</blockquote>";   # idea taken from Josh in
MacPerl

 if ($input{'variables'}) {
 print "<h3> The variables are: </h3> \n";
 print &PrintVariables(%input);
 
#Close the document.
 print &HtmlBot; }


http://www.accesscom.com/~gcingo/gcingo/home.html
http://www.accesscom.com/~gcingo/4db/4db1.html


***** Want to unsubscribe from this list?
***** Send mail with body "unsubscribe" to mac-perl-request@iis.ee.ethz.ch