Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re: Sort an array of strings based on two fields

by choroba (Cardinal)
on Mar 14, 2013 at 10:18 UTC ( [id://1023447]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    #!/usr/bin/perl
    use warnings;
    use strict;
    ...
    } @string;
    
    say for @sorted;
    
  2. or download this
    #!/usr/bin/perl
    use warnings;
    use strict;
    ...
        my ($year, $number) = split /-/, $s;
        return $year . sprintf '-%03d', $number;
    }
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1023447]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others about the Monastery: (3)
As of 2024-04-26 06:20 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found