The text file that I want to insert is
dougs.txt
============= Which has two sentences =============
Hey it works...
Happy Belated Birthday...
==============================================
The Code
dougs1.cgi
=============================================
#!/usr/bin/perl
print "Content-type: text/html", "\n\n";
print "<HTML>\n<HEAD>\n";
print "<title>test page</title>\n";
print "</head>\n";
print "<body>\n";
print "Test 1\n";
open TEXT, "../cards/dougs.txt";
while (<TEXT>) {
$text = "$text.$_"
}
print "$text\n";
print "\n\n\n";
print "Test 2\n";
open(TEXT, "../cards/dougs.txt");
($ip) = <TEXT>;
close TEXT;
chomp($ip);
print "$ip\n";
print "</body>\n";
print "</html>\n";
==========================================
The Output
==========================================
Test 1 .Hey it works... .Happy Belated Birthday... . . Test 2 Hey it
works...
==========================================
The Question:
What do I need to do to get the Output to look like dougs.txt?
and
How come my newline \n"; didn't seem to work??? Where did the dots come
from?
----- Original Message -----
From: "Patrick" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, February 19, 2002 8:05 AM
Subject: selecting a text file for HTML output
> I thought had this. I now know how to select two radio buttons at the same
> time. I have the first one selecting an image and putting it into a cel in
> a table works fine but the other radio button I am using is to select a
txt
> file. How do I go about putting a selext txt file in an html out put via
cgi
> this is what i have but it just puts the name of the txt file into the
cell
> not the actuall file.
> <IMG SRC=$BASEURL/$fields{'pic_select'} height=400 width=300 BORDER=0>
for
> the image and for the txt i have
> <TD WIDTH=360>
>
> $fields{'poam_select'}<br>
> <HR WIDTH=200>
> anyone have any suggestions. I have the poam_select catagory in the html
> page set already but like i said it just puts in the name of the txt file
i
> have selected not the actual text from the file.
> Any suggestions on different ways to do this.
> Pat
> Check out www.my-pcdoctor4u.com for all kinds of FREE items including FREE
> E-Cards.
>
> --
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]