in reply to Sorting of numbers using arrays

Wouldn't it be much easier if you give us the email-address of your teacher instead? That would prevent possible errors when you copy-n-paste our solutions ...

Note: We at PerlMonks expect some effort by you. We would be glad to help with a specific problem you encountered by trying yourself. However we are not a do-your-homework service. And we don't like to help those who are too lazy to think/google/read manuals themselves.