A better approach might be to use eval and check the value of $@:
eval {require Win32API::File}; if (not $@) { my @drv = map {s/\\$//;lc} Win32API::File::getLogicalDrives(); print @drv; }
--
John.
"Strange things happen when you're not around" - Billy Bragg
In reply to Re: strange things happen
by jmcnamara
in thread problem with @INC when using activestate perl
by NaSe77
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |