At 19-1-2002 15:29 -0600, Shawn wrote:
>Try something like this:
>
>my $string=$homDir;
>my @dir=qw(directory somedir someotherdir yetanotherdir);
>for(@dir) {
> $string.=$_;
> mkdir $string, 0755;
>}
>
>untested
Tested and approved, but...
The (sub)dirs I want to create are input from a form, so I had to change
your example a little because
my @dir=qw($FORM{'dir'});
doesn't work. This is what I made of it :
my $string = $homeDir;
my @dir = split (/\//, $FORM{'dir'});
for (@dir) {
$string .= "/$_";
mkdir $string, 0755;
}
This seems to work for me but comments are welcome.
Kind regards,
Rene Verharen
Please DO NOT reply to me personally. I'll get my copy from the list.
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]