List of directories with a particular name using perl

Hi experts,

Sorry if it is repeated query.

I have folder that contains many files & folders. But I need to get the list of folders with the following format "1.0.0.0.003X", 1.0.0.0.004X..and so on. How do I get the same using perl?

I have this script which will do the listing.

$dir = "/usr/home/amdoc/";
   opendir(DIR, $dir) or die $!;
 while (my $file = readdir(DIR)) { 
 next unless (-d "$dir/$file"); 
 print "$file\n";      }  

=========================================
I am not comfortable with regular exp so need your help.

Thanks

amvarma

Try this,

$dir = "/usr/home/amdoc/";
opendir(DIR, $dir) or die $!;
print map("$_\n",grep(/^\d+\.\d+\.\d+\.\d+\.\d+/,(readdir(DIR))));