On Thursday, May 23, 2002, at 04:13 , Frank Wu wrote:
> I have a perl script using system function, owner is root, like,
>
> print "Previous $?, $!" ;
> system("mkdir --parents --mode=0755 /home/myhome/disp/archive") == 0
> or die "Unable to create directory,$!, $?"
>
> system function sometimes return non-zero value, $? is -1 $! is No child
> process, but the directory is actually created and mode's changed, There
> are
> enouhg file handlers and inodes. It also happens to touch, echo, open
> pipe.
two ideas:
unless( -d $dir ) {
# it is not there, hence I must make it
# think about something like File::Path
# and scope out mkpath( [ @lower_dir ] , 1, 0755);
}
an example can be scoped at
http://www.wetware.com/drieux/pbl/misc/linkToNowhere.txt
where I used such a process to create subdirectories...
ciao
drieux
---
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]