in reply to Re^2: how to create folders
in thread how to create folders

You could do it somewhat smarter and extract just the numbers:
my @numbers = map /object(\d+)000/, grep -d, readdir(DIR);

You can even directly pull out the highest number by using max out of List::Util:

use List::Util 'max'; my $highest = max map /object(\d+)000/, grep -d, readdir(DIR);

And using glob instead of readdir can help you wead out the unwanted files before trying to process them, if there's a lot of other stuff in the directory you may be not interested in:

my $highest = max map /object(\d+)000/, grep -d, glob 'object???000';