It wasn't clear if "a client" is just a number, and if you need the three directories made for each of the 10,000 clients.
Also, do you always group together directories in chunks of ten? If the answer to all these is "yes", then something like this may do the trick:
my $chunk_size = 10;
foreach my $chunk (0 .. 10_000 / $chunk_size) {
my $start = $chunk * $chunk_size;
my $end = $start + $chunk_size - 1;
# I say "${start}" to keep it from being interpreted as $start_
mkdir "2005/${start}_$end" or die "can't mkdir: $!";
foreach my $client ($start .. $end) {
mkdir "2005/${start}_$end/$client" or die "can't mkidir: $!";
foreach (qw/addendums current archive/) {
mkdir "2005/${start}_$end/$client/$_" or die "can't mkidir
+: $!";
}
}
}
(I didn't test this.)
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.