At 11:54 am -0700 24/9/03, Mark Wheeler wrote:

.. I was under the impression that when I used the "<" or ">" or ">>" in an open command i.e.:

open (DATA, "< example.txt");

that it would creat the file if it wasn't there (with the appropriate
[default?] permissions...at least that's what happens on my other hosts. And
if that is true, is there a place in the httpd.conf file to set the default
permissions for newly created files/folders, as well as allowing new files
to be created if not found? Why is it  that on my other host
(Hostcentric.com) that files are created when not found but on my Mac
(10.2.6) they are not? Any ideas, anyone.


For example:


<http://cgi.bd8.com/cgi-bin/showdate.pl> has the script:


#!/usr/bin/perl
$f = "textfiles/date.txt" ;
open F, ">$f" ;
print F scalar localtime;
open F, $f ;
$s = <F>;
print "Content-Type: text/html\n\n<h1>$s</h1>" ;




showdate.pl has permissions 755 texfiles/ has permissions 777 date.txt is created by showdate.pl with permissions 644




Reply via email to