Help for this page

Select Code to Download


  1. or download this
    use re 'debug';
    
    ...
       map [ $_, join('', (/(..)(..)(....)/)[0,1,2]) ],
       @dates;  # DD-MM-YYYY
    print "@sorted\n";
    
  2. or download this
    Compiling REx `(..)(..)(....)'
    size 21 Got 172 bytes for offset annotations.
    ...
    Match successful!
    20130401 20130501 20130601
    Freeing REx: `"(..)(..)(....)"'
    
  3. or download this
    use warnings;
    use strict;
    ...
    print join ' ' => map{$_->[0]}
                  sort{$a->[1] <=> $b->[1]}
                  map{/.{4}(.{2})/;[$_,$1]} @dates;