# code found under "Decorating Lists" entitled paragraph, line 6. my @files = reverse sort map { -d $_ ? $_ : () } readdir DIR;