in reply to Re: weird subroutine behavior
in thread weird subroutine behavior
Thanks a lot. If I change the "sort" to the proposed version, the subroutine works as expected
Since, all of you were thinking about what I was trying to accomplish with this "sort", this is what I tried to do:
having:
$substrings[0]
$substrings[1]
$substrings[2]
$substrings[3]
I wanted to sort by two keys:
1. Descending - by the difference of $substrings[1] and $substrings[0]
2. Ascending - by $substrings[0]
Please let me know if you can lead me to a better and safer version of "sort".
|
|---|