Lixin,
Perl's mkdir function does not do parent directory creation
like the shell command "mkdir -p somedir". I wrote a little function to
get around this.
# make a directory and it's parent if necessarysub
mkdirp { my $dir = shift; my $check;
# if something with this path al
Does sct_1.61 exist? If not,
create it first before making the subdirectory beneath
it.
From:
[EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
Ella CaiSent: Monday, November 15, 2004 7:22 AMTo:
[EMAIL PROTECTED]Cc:
[EMAIL PROTECTED]Subject: [Perl-unix-users]
mkdir questions on
Ella Cai <[EMAIL PROTECTED]> writes:
> My codes is like this:
> **
> my $new_data_dir = "/var/tmp/sct_1.61/data";
> mkdir ($new_data_dir, 0744) unless (-d $new_data_dir);
> *