Reading subdirectories
From: Colin (no_at_e-mail.com)
Date: 11/28/03
- Next message: Jürgen Exner: "Re: Reading subdirectories"
- Previous message: Mike Flannigan: "Newsgroup Searching Program"
- Next in thread: Jürgen Exner: "Re: Reading subdirectories"
- Reply: Jürgen Exner: "Re: Reading subdirectories"
- Reply: Glenn Jackman: "Re: Reading subdirectories"
- Reply: Bob Walton: "Re: Reading subdirectories"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Fri, 28 Nov 2003 17:28:43 -0000
Hi, I am trying to use the following code to read the contents of a several
subdirectories in a single directory.
opendir(MainDir, "/home/colin/data")
while ($file = readdir(MainDir) {
print "$file\n";
opendir(SubDir, $file)
while($otherfiles = readdir(SubDir) {
print "$otherfiles\n";
}
}
Why can I not use $file to represent the directory I want to open in the
second opendir statement?
Can anyone help?
Thanks
- Next message: Jürgen Exner: "Re: Reading subdirectories"
- Previous message: Mike Flannigan: "Newsgroup Searching Program"
- Next in thread: Jürgen Exner: "Re: Reading subdirectories"
- Reply: Jürgen Exner: "Re: Reading subdirectories"
- Reply: Glenn Jackman: "Re: Reading subdirectories"
- Reply: Bob Walton: "Re: Reading subdirectories"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]