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

Beginner question

Thread Next
From:
Frank 'Olorin' Rizzi
Date:
February 27, 2002 01:50
Subject:
Beginner question
Message ID:
20020227021030.42927.qmail@onion.perl.org
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:

#!/usr/bin/perl

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

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

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

// HERE

   }

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
e-mail: fr1@sprynet.com
or fkh1000@yahoo.com





Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About