in reply to Re: Creating Multiple Empty Directories with Perl
in thread Creating Multiple Empty Directories with Perl

Why are you using system? Perl has a mkdir function.

Also, using mkpath is overkill if all directories are being created at the same level.

Replies are listed 'Best First'.
Re^3: Creating Multiple Empty Directories with Perl
by samtregar (Abbot) on Sep 28, 2005 at 06:41 UTC
    You know, I asked myself the same question when I saw the other replies. I guess I forgot it was there! I always use File::Path out of laziness. Who wants to worry about how many levels need to be created?

    -sam

      True. Then the following would suffice:

      perl -MFile::Path -e 'mkpath("dir$_") for 1..20'