in reply to Sorting filenames with custom function
Absolutely. You can use any function you can write. Check out the perldoc on sort.
Give it a try, and if you're still having trouble, show us what went wrong and we'll be glad to help you.