in reply to problem with @INC when using activestate perl

This works fine for me:

use strict; use warnings 'all'; my $found = 0; for my $in_path (@INC){ next if ! -e $in_path."\\Win32API\\File.pm"; print "found module in $in_path ...\n"; $found = 1; last; } if ($found == 1){ use Win32API::File; my @drv = map{s/\\$//;lc} Win32API::File::getLogicalDrives(); print @drv; }

Giving these results:
found module in C:/Perl/site/lib ... a:c:d:e:p:u:

SMiTZ

Update: All though this works OK, its pointless putting use into a conditional block as it gets loaded at compile time. Testing for its existance after perl has attempted to load it seems a bit superfluous. Ooops, thanks jmcnamara.