On 03/10/05, John E. Malmberg <[EMAIL PROTECTED]> wrote:
> Sebb wrote:
> > On 03/10/05, John E. Malmberg <[EMAIL PROTECTED]> wrote:
> >
> >>New files opened for write are created in the first directory of a
> >>search list. New files opened for append are created in the last
> >>directory of a search list.
> >
> > Are you sure appended files use the last directory?
> >
> > This doesn't happen with Perl 5.5-3A3.
>
> I am going by the behavior of the file system.
When using C on VMS 7.3-2 on an ODS-2 volume the following code:
#include stdio
main(){
FILE *out=fopen("chain:c.tmp","a");
if (out == NULL) perror("fopen");
fprintf(out,"test\n");
fclose(out);
}
creates the output file in the first link in the chain, not the last.
But if c.tmp already exists elsewhere in the chain, it is appended to correctly.
S.