Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: treat pairs, set as one item: looking for better way

by kcott (Archbishop)
on Oct 19, 2013 at 07:00 UTC ( [id://1058880]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    #!/usr/bin/env perl -l
    
    ...
    for (sort { @$b <=> @$a } map { [ sort keys %$_ ] } @{$sets{data}}) {
        print join ',' => @$_;
    }
    
  2. or download this
    e,f,g
    a,b
    ...
    d
    h
    i
    
  3. or download this
    [
        { a => 2, b => 2 },
    ...
        { h => 1 },
        { i => 1 },
    ]
    
  4. or download this
    {
        a => $sets{data}[0],
    ...
        h => $sets{data}[4],
        i => $sets{data}[5],
    }
    
  5. or download this
    sort { @$b <=> @$a }
    
  6. or download this
    sort keys %$_
    

Log In?
Username:
Password:

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

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

    No recent polls found