in reply to My best attempt at sorting. Kindly suggest improvements/modifications.

I say in all kindness that your algorithm is an example of a naiive, remarkably inefficient, and actually-broken sorting algorithm which would not work at all if the biggest number in the list was negative and which does not properly identify the smallest one unless it is less than zero. If you are interested in classical sorting algorithms – Shell sort, merge sort, and so on – working examples are readily available in source-code form either in Perl or in other languages that can be adapted to Perl. But, as you've already learned, Perl contains a very robust built-in sort verb. Beyond that, the CPAN library of contributed code contains battle-tested packages that are well suited to any production situation. You never have to write your own sort.
  • Comment on Re: My best attempt at sorting. Kindly suggest improvements/modifications.

Replies are listed 'Best First'.
Re^2: My best attempt at sorting. Kindly suggest improvements/modifications.
by Your Mother (Archbishop) on Jan 30, 2018 at 04:40 UTC

      +1 for Heavy Metal

      Three thousand years of beautiful tradition, from Moses to Sandy Koufax, you're god damn right I'm living in the fucking past

Re^2: My best attempt at sorting. Kindly suggest improvements/modifications.
by Anonymous Monk on Jan 30, 2018 at 00:13 UTC
    sundialsvc4 a.k.a Mark, is that you? Did you even test the code?