
HaveNoBoundary
New User
Sep 21, 2002, 7:49 PM
Post #1 of 6
(328 views)
|
|
write directory out in alphabetical order?
|
Can't Post
|
|
Hi, I just want to write a directory out to html in alphabetical order. Here is what i have: $dirtoget="/sambar50/music/guitar_pro_files/"; opendir(IMD, $dirtoget) || die("Cannot open directory"); @thefiles= readdir(IMD); closedir(IMD); Blah, blah, blah......... foreach $f (@thefiles) { unless ( ($f eq ".") || ($f eq "..") ) { print("<p align=\"center\"style=\"margin-top: 0\; margin-bottom: 0\"><a href=/music/guitar_pro_files/$f>$f</a><BR></p>"); } } this works....the problem is that I want it in alphabetical order. Any help would be nice! Please, nothing to complicated! Thank You in advance! Chris
|