Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re: sorting array of array references with multiple dereferenced array elements

by jonadab (Parson)
on Sep 23, 2014 at 12:51 UTC ( [id://1101632]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    use Data::Dumper; print Dumper(+{ unsorted => \@array });
    @array = sort {
    ...
    } @array;
    use Data::Dumper; print Dumper(+{ 
        sorted_on_first_three_elements => \@array });
    
  2. or download this
    use Data::Dumper; print Dumper(+{ unsorted => \@array });
    @array = sort {
    ...
      return 0;
    } @array;
    use Data::Dumper; print Dumper(+{ sorted => \@array });
    
  3. or download this
      my @user = (
       # [ username, fullname, authlevel, { otherinfo } ],
    ...
                   { supervisor => 'amcclain', department => 'theology', }
    + ],
       # and so on and so forth
      );
    

Log In?
Username:
Password:

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

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

    No recent polls found