Help for this page

Select Code to Download


  1. or download this
    use strict;
    use warnings;
    ...
    
    my @have = sort { ($a =~ /(\d+)/)[0] <=> ($b =~ /(\d+)/)[0] } @in;
    is_deeply \@have, \@want;
    
  2. or download this
    use strict;
    use warnings;
    ...
    
    my @have = sort { substr ($a, 2) <=> substr ($b, 2) } @in;
    is_deeply \@have, \@want;