in reply to Re^2: sorting an array with decimal points
in thread sorting an array with decimal points

Thanks all for great solutions. Ended up with Athanasius one...Cheers.

  • Comment on Re^3: sorting an array with decimal points

Replies are listed 'Best First'.
Re^4: sorting an array with decimal points
by BillKSmith (Monsignor) on Jan 14, 2018 at 14:39 UTC
    I understand that you already have a great solution. However, if you prefer a solution which implements your specification exactly, you can use another module (List::UtilsBy).
    use strict; use warnings; use List::UtilsBy qw(nsort_by); my @array = qw(Patch_1.0 Patch_2.0 Patch_3.1 Patch_5.0 Patch_4.2 Patch_6.0 Patch_7.0 Patch_8.0 Patch_9.3 Patch_10.2); { local $, = "\n"; print nsort_by {s/Patch_//} @array }

    UPDATE: Added link.

    Bill