Re: Installing Perl

by "Jan Morell" <jan_man(at)bellsouth.net>

 Date:  Thu, 28 Dec 2000 10:38:26 -0500
 To:  "Franklin,
Douglass" <Douglass.Franklin(at)ssa.gov>,
<hwg-languages(at)hwg.org>
 References:  ssa
  todo: View Thread, Original
I sure do Doug,

http://activestate.com/  I have been using their Windows builds for a long
time and they work very well. For your NT platform, you only need the
Service Pack +5 so you should be OK.

The installation should take care of the 'path' for you.

If you have a script that is working from the command line and not the
browser, it is most likely that the HTML header is missing from the script.
You should have this line in your script before you have any other content
meant for the browser.

print "Content-type: text/html \n\n";

Jan

----- Original Message -----
From: "Franklin, Douglass" <Douglass.Franklin(at)ssa.gov>
To: "'Jan Morell'" <jan_man(at)bellsouth.net>; <hwg-languages(at)hwg.org>
Sent: Thursday, December 28, 2000 10:11 AM
Subject: Installing Perl


Jan -

I'm pleased you found your solution!  Although I played such a miniscule
part in helping, it's nice to have participated.  Now, I have a question for
YOU...do you know any resources I could consult to set up Perl on my local
computer?

Processor:  Intel Pentium III 700 MHz
OS:         Windows NT 4 Service Pack 6 (Administrative rights)
Web Server: Apache for Win32 (Obtained from www.phptriad.com)

Now, Perl works with this setup just fine on the command line.  I don't know
how to get the browser involved...

1. What do I put onto the she-bang line (if it's even necessary)?
2. Must I modify some kind of "perl path" somewhere?

Thanks for ANY assistance,

- Doug

-----Original Message-----
From: Jan Morell [mailto:jan_man(at)bellsouth.net]
Sent: Wednesday, December 27, 2000 6:29 PM
To: Cyanide _7
Cc: hwg-languages(at)hwg.org
Subject: Re: passing variables from one form to another using Perl


I finally got it.  I isolated the content of the value statement on a line
by itself so I could debug it easier.  The final code that works is:

print "".$ON."\n" ; where $ON is the variable.

Thanks to you and Doug Franklin for your help.

----- Original Message -----
From: "Cyanide _7" <leo7278(at)hotmail.com>
To: <jan_man(at)bellsouth.net>
Cc: <hwg-languages(at)hwg.org>
Sent: Wednesday, December 27, 2000 5:10 PM
Subject: Re: passing variables from one form to another using Perl


disclaimer: i dont know perl
assumption: the code:
  $ON = $field{'ON'} ; #Category
is correct in obtaining the value of the named field.

with that said, your code should work. i recommend encompassing your VALUE
attribute with double quotes. also, make sure (via the source) that whats
being written from $ON does not contain any quotes itself. if so, i
recommend replacing them with HTML equivalents or just HTML encoding the
entire line (i'm not even sure if perl has such a thing, but im sure you
could write one). for example, if $ON contained the string foo"bar" and you
wanted that to appear in the next form, the HTML should read <INPUT
NAME="data1" VALUE="foo&quot;bar&quot;">. is this your problem? also, i try
to always use double quotes in HTML as well as scripting for strings of any
kind, and i escape any quote contained by the string. i guess its just habit
from Java, but its safer than trying to put doublequotes into single quotes.
- Cyanide_7

>Sure Doug,
>
>The second page is being generated by a CGI. The section in question is
>below:
>
>Here are the variables:
>
>$ON = $field{'ON'} ; #Category
>$Sub = $field{'Sub'} ; #Sub-Category
>$S1 = $field{'S1'} ; #Question
>
>Here is the section where I am trying to insert them:  ( into data0, data1,
>and data2) *note:  There might be some word wrapping here. (In this example
>I had tried single quotes.)
>
>print '                                      <input type="text"
>name="data0"
>value=\'$ON\'>'."\n" ;
>print "                                    </p>\n" ;
>print "                            </td>\n" ;
>print '                                  <td width="334"> <font
>face="verdana, arial, helvetica" size="2" color="#000080"><b>Subcategory
>'."\n" ;
>print "                                    </b></font> \n" ;
>print '                                    <input type="text" name="data1"
>value=\'$Sub\'>'."\n" ;
>print "                                  </td>\n" ;
>
>------------SNIP-------------------------
>
>print "                                      The more information you give
>us,&nbsp;<br>\n" ;
>print "                                      the faster and more accurate
>our response \n" ;
>print "                                      will be.<br>\n" ;
>print '                                      <textarea rows="2"
>name="data2"
>cols="54">\'$S1\'</textarea>'."\n" ;
>
>
>If you need any other information, let me know.
>
>Jan
>
>
>----- Original Message -----
>From: "Franklin, Douglass" <Douglass.Franklin(at)ssa.gov>
>To: "'Jan Morell'" <jan_man(at)bellsouth.net>; <hwg-languages(at)hwg.org>
>Sent: Wednesday, December 27, 2000 2:04 PM
>Subject: RE: passing variables from one form to another using Perl
>
>
>Jan -
>
>Would you send a snippet of page #2?  I believe I can help.
>
>- Doug
>
>-----Original Message-----
>From: Jan Morell [mailto:jan_man(at)bellsouth.net]
>Sent: Wednesday, December 27, 2000 11:59 AM
>To: hwg-languages(at)hwg.org
>Subject: passing variables from one form to another using Perl
>
>
>I have seen something like this before, but the HWG search seems to be out
>so I was not able to check the archives.
>
>I have a two part form where the visitor fills in some information and then
>that information should be passed to another form filling in the fields
>with
>the information that the visitor has supplied using Perl
>
>I have no trouble passing the contents of the form variables to the body of
>the page, but when I try to put them into the 'value' of the form element,
>it only shows the variable name and not the value.
>
>I have tried to enclose the variable name in single, and double quotes, and
>no quotes.  What is the format that a variable going into another form
>element should follow?
>
>Thanks in advance.  If you need any snippets, I would be happy to include
>them.
>
>Jan
>
>

_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com

HWG: hwg-languages mailing list archives, maintained by Webmasters @ IWA