How do I find if a specific directory exists in a filesystem using perl

Hi,
I have a problem where I was asked to find if a particular directory exists in a filesystem. For example we have SunOS unix operating system which has /uXX filesystems. I need a perl script which would determine which all filesystems contain a directory called 'odsap1'.
Could anyone please provide with a perl script which would search all the filesystems and determine which all would contain this directory called, 'odsap1'.
Thanks in advance. Your help is really appreciated
gravindra1977Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Suhas .QA ManagerCommented:
File::Find module can help you to get the solution...

http://search.cpan.org/~rgarcia/perl-5.10.0/lib/File/Find.pm 
0
Adam314Commented:
use File::Find;
find(sub{print $File::Find::name if (/odsap1/ and -d $_);}, '/');
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
TintinCommented:
Do you really want to use Perl for such a simple task?  Just type in

find / -type d -name odsap1
0
TalmashCommented:
$dir = "/bla/bla";
if (-d $dir) {
  print "$dir exist\n";
}
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Unix OS

From novice to tech pro — start learning today.