John,
  I may be a little old fashioned, however, the code below seems to work
OK.

>open(INFILE, "<mytextfile.txt") || die "Error opening
mytextfile.txt.$!,stopped";
>@info = <INFILE>;
>close(INFILE);


Sincerely in Christ,
Mark-Nathaniel Weisman
President / Owner
Outland Domain Group Consulting
Anchorage / Washington DC / Bellevue
[EMAIL PROTECTED]


-----Original Message-----
From: John Park [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, September 17, 2003 11:00 AM
To: [EMAIL PROTECTED]
Subject: Problem writing to a file


Hi everyone,
I have a script where I am trying to write information to a file but 
could not do so.
This is what my script looks like:
#!/usr/bin/perl
use CGI;
...
...
open(FILE,">newfile.txt") || die("newfile.txt: $!"); #script stops here 
due to permissions

I can open files, and output its contents to a new webpage.
Am I using the wrong function for creating files?
Thank you.

-John


-- 
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]

Reply via email to