in reply to Re: mkdir with a list variable
in thread mkdir with a list variable
Update:Ah bollocks, that's exactly what the OP wants to do, ignore me please.
To solve your larger problem of calling arbitrary builtins with the appropriate parameters, I think you will have to explicitly pass the parameters:mkdir $a[0], $a[1];
That won't work, it'll just create the directory $a[0] with the permissions as per filemask $a[1] (at least that's what it does on my 5.8.8 on Linux, is this different on Windows?)
To the OP: mkdir expects a single directory name. If you want to create multiple directories just do so in a loop, e.g.
for my $d (@a) { mkdir $d or die "Couldn't create directory $d: $!"; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: mkdir with a list variable
by Corion (Patriarch) on Mar 04, 2008 at 12:29 UTC |