you can also use readdir in scalar context to just return the next item in the directory.my $directory="/home/myuser/mp3s"; opendir(DIR, $directory) or die "couldn't open $directory: $!\n"; my @files = readdir DIR; closedir DIR;
In reply to Re: How do I read all the file names of a directory into an array?
by reyjrar
in thread How do I read all the file names of a directory into an array?
by Ri-Del
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |