On 9/24/03 6:37 AM, "Mark Wheeler" <[EMAIL PROTECTED]> wrote:
> Hi, > > This is my first post to this group. Please forgive me if this is the wrong > group for this question. > > I've been coding for a short time (a year or so) and love it. I've been > using other hosts for my scripts, and am now setting up my OSX server. I've > run into a snag. I can't figure it out. When I try to read (or write, for > that matter) to a file nothing happens. Below is an example script. If the > file is there, nothing. If the files is not there, nothing. I get the > initial print statement about the file contents, but that's it. Is this a > permissions problem? I've checked the permissions of the folder and it's > 775, everything looks good. What am I missing. > > Again, forgive me if this post is misplaced. > > Mark > > -------------------------- > #!/usr/bin/perl -w > > use strict; > > print "Content-type: text/html\n\n"; > > print "The contents of the file: <br><br>"; > > open (DATA, "example.txt") || die ("Could not open file <br> $!"); > my @text = <DATA>; > print @text; > close (DATA); > > exit; > > --------------------------- The above runs for me just fine (perl 5.8.0/ 10.2.8) from within bbedit. Since you get the initial statement - e.g. Part of your program are actually run through the interpreter I assume that you've taken care of the path to perl and also made sure you got Unix and NOT Mac line breaks. You probably intend to run this as a cgi script - thus how did you actually run the script? /h