Hi,
Does anyone know how to browse through a folder to find all the files contains in it? I know how to use the opendir function but:
1. I'm having problem with looping in which i can use to browse through ALL the folders and ALL the files contained in it.
2. What should i do to print our the directory of the current file?
Thanks.
Anyway, here's my code so far:
#/usr/bin/perl
#browse.pl
use warnings;
use strict;
print "Files of the current directory:\n";
opendir DH, "C:\\Program Files\\Player\\" or die "Couldn't open the current directory: $!";
while ($_ = readdir (DH))
{
print $_, " " x (30-length($_));
}