How would I sort the output of the readdir function in reverse order? while (defined($File = readdir(DIR))) { do something } I've tried various things, all of them messy and failures. Tom Bakken