sorting filenames ?
0 answers - 713 bytes -

I know how to read out filenames within my current directory.
But now I have the following question in my directory there are a lot
of files with the format <number>.txt, like 1.txt , 2.txt and so on
These files are automaticly generated by an other script.
Is there a way to retrieve all the <number>.txt files, and more
important is there an easy way to find out what the highest number of
those files is ?
With these lines I read out the current filenames:
opendir (homedir,".") || die("unable to open directory");
while (defined($filename=readdir(homedir))){
print qq{$filename<br>};
}
closedir(homedir);
I hope someone can help me out here