#!usr/bin/perl $path='/home/something/something/something'; opendir(DIR,$path) or die"couldnt open the directory\n"; while(readdir(DIR)) { if(-d BUS) { opendir(VEH,"BUS") or die"couldnt open the directory\n"; while(readdir(VEH)) { print "$_\n"; } } }