develooper Front page | perl.beginners | Postings from February 2002

Beginner question

Thread Next
Frank 'Olorin' Rizzi
February 27, 2002 01:50
Beginner question
Message ID:
Hello everybody.

I am just starting with Perl,
so the following question will probably appear simple to most of you.

I am trying to get a Perl program to provide me with a listing of the files
stored on the machine (where the program runs).
The environment is a Win machine..

Say I have something like the following:


use File::Find;
use Win32API::File ":ALL";

foreach (getLogicalDrives())
   my $dir = $_;

   next unless (GetDriveType($_) == DRIVE_FIXED);



What would you put where the //HERE line is in order to get a directory
listing of the $dir ?
Is there anyway I can have this directory listing to immediatly expand
subdirectories, or should I make it a recursive sub ?

Thank you in advance,

Frank 'Olorin' Rizzi

Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About