Felix -
Good comment. I missed the GetLogicalDrives... But I did have fun writing
my first module!
Aloha - Beau.
-----Original Message-----
From: Felix Geerinckx [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, May 14, 2002 11:22 PM
To: [EMAIL PROTECTED]
Subject: Re: Win32::Getdrives
on Wed, 15 May 2002 03:53:20 GMT, [EMAIL PROTECTED] (Beau E. Cox)
wrote:
> A recent poster asked for a way to get a list of drives on an
> Win32 system.
> Since I couldn't find a pure-perl way to do it,
Pure Perl: try them all :-)
#! perl
use strict;
my @driveletters = ();
for ('A'..'Z') {
if (opendir DIR, "$_:/") {
push @driveletters, $_;
closedir DIR;
}
}
print "driveletters: @driveletters\n";
> I wrote a Win32::Getdrives
> module (my first ever.) This module is available at
> <http://www.beaucox.com/perl/modules/getdrives/getdrives.html>.
For those (like myself) who
(a) Don't have a win32 c-compiler to compile Beau's module
(b) Think the pure Perl method above is just plain silly
there's always the 'GetLogicalDrives()' function in the
'Win32API::File' module.
--
felix
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]