I just bought a book on Perl-5 for web professionals and thought I'd learn the language. I've run into a problem on the first example program...can't believe it. I've wasted a lot of hours on what is most likely something real stupid.<br>
<br>
I’m to the point that I’m actually “asking for directions” . <br>
<br>
The example program is real real basic. The script example simply opens an ordinary text file and prints it on the screen. (later I’ll try and do via the web…right now it’s just supposed to run via a dumb terminal on a unix plateform).<br>
<br>
Help…please.<br>
<br>
Here is the contents of the read file called “article1.txt”:<br>
<br>
This is a test. Line1.<br>
this is a test. Line2.<br>
<br>
<br>
Here is the contents of the script file called “read.cgi”<br>
<br>
#!/usr/bin/perl<br>
open(ARTICLE1, "article1.txt"
;<br>
while (<ARTICLE1>
# like while($_ = <ARTICLE1>
<br>
{<br>
print; # like print ($_);<br>
}<br>
<br>
I created both files on my pc and ftp’ed them into a unix computer at my ISP.<br>
Both files are located in a folder called cgi-bin.<br>
<br>
Thanks for the help.<br>
<br>
Jerry<br>
<br>
I’m to the point that I’m actually “asking for directions” . <br>
<br>
The example program is real real basic. The script example simply opens an ordinary text file and prints it on the screen. (later I’ll try and do via the web…right now it’s just supposed to run via a dumb terminal on a unix plateform).<br>
<br>
Help…please.<br>
<br>
Here is the contents of the read file called “article1.txt”:<br>
<br>
This is a test. Line1.<br>
this is a test. Line2.<br>
<br>
<br>
Here is the contents of the script file called “read.cgi”<br>
<br>
#!/usr/bin/perl<br>
open(ARTICLE1, "article1.txt"
while (<ARTICLE1>
{<br>
print; # like print ($_);<br>
}<br>
<br>
I created both files on my pc and ftp’ed them into a unix computer at my ISP.<br>
Both files are located in a folder called cgi-bin.<br>
<br>
Thanks for the help.<br>
<br>
Jerry<br>