Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

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

by andal (Hermit)
on Sep 23, 2014 at 13:33 UTC ( [id://1101635]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    my $limit = $array[0][0];
    for(my $i = 1; $i <= $#array; $i++)
    ...
         $limit = $chk if($chk lt $limit);
    }
    print "Smallest ID is $limit\n";
    
  2. or download this
    my $limit = $array[0];
    for(my $i = 1; $i <= $#array; $i++)
    ...
               || ($chk->[0] eq $limit->[0] && $chk->[1] lt $limit->[1]));
    }
    print "Smallest is $limit->[1]\n";
    

Log In?
Username:
Password:

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

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

    No recent polls found