Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: Sorting on Section Numbers

by athomason (Curate)
on Jul 28, 2000 at 03:24 UTC ( [id://24777]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    my @a = qw/1 2 2.2 2.13 2.1.7 3.4a 10.4a.3b.8/;
    my @sortables = map { [grep /[^\.]/, split/([\.a-z])/, $_] } @a;
    print join "\n", map join(' ', @{$_}), @sortables;
    
  2. or download this
    my @list = qw/1 10.4a.3b.8 2.2 2 2.13 3.4a 2.1.7 /;
    
    print join "\n", sort compare @list;
    ...
            redo;
        }        
    }
    
  3. or download this
    my @list = qw/1 10.4a.3b.8 2.2 2 2.13 3.4a 2.1.7 /;
    
    my @cache = map { [grep /[^\.]/, split/([\.a-z])/, $_] } @list;
    ...
            redo;
        }        
    }
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others chanting in the Monastery: (4)
As of 2024-03-28 21:07 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found