Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re(demerphq): Helping Beginners

by demerphq (Chancellor)
on Nov 01, 2001 at 07:12 UTC ( [id://122490]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    @data = map  { $_->[0] }
            sort {   $a->[3] <=> $b->[3]  # YY
    ...
                   ||$a->[2] <=> $b->[2]} # DD
            map  { [ m!^\s*(\D*(\d+)/(\d+)/(\d+)(?: [\d.]+)*)\s*$! ] }
            @idata;  #     0    1MM   2DD   3YY
    
  2. or download this
    
    @data = sort { $a->[1] cmp $b->[1] }      # Sort by YYYY/MM/DD
    ...
                   # 2 digit dates is madness
                   \@p} # return the fixed array
            @idata;
    
  3. or download this
    @data = map  {substr($_,3)}
            sort #lexicographical representation of the date
            map  { m!^\s*(\D*(\d+)/(\d+)/(\d+)(?: [\d.]+)*)\s*$!
                   && pack ("CCCA*",$4,$2,$3,$1)}
            @idata;
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others exploiting the Monastery: (4)
As of 2024-04-24 21:56 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found