Scripting
>>
Perl
>>
How to list a directory
#!perl $dirname = "../htdocs"; opendir(DIR,$dirname); @files = grep{!/^\./} readdir(DIR);# remove the dots closedir(DIR); foreach $file (@files) { print "$file\n"; }
Please enable JavaScript to view the
comments powered by Disqus.