sorting hash

2005-12-26 Thread Anders Stegmann
Hi! I have a script like: %hash = qw(1 A 2 B 3 C); while (($key, $value) = each %hash) { print "$key => $value\n"; } it prints out: 1 => A 3 => C 2 => B I want it to print out a sorted hash like: 1 => A 2 => B 3 => C How do I do that? Regards Anders. Anders Stegmann Ph.d. stud

sorting hash numerically

2003-02-04 Thread Rob
Hi, I want to sort a hash based on the employee number; I used a foreach loop but it sorts the hash based on the ascii value. How would I get it to sort on integer values? foreach $empNo (sort (keys(%empName))) { print "$empNo $empName{$empNo}\n"; } -- Rob -- To unsubscribe, e-mail: [E

sorting %hash entries

2002-07-22 Thread dan
I have a small query regarding how to sort hash entries in numerical order. %usernum { "server.one.com" "15", "server.two.com" "5", "server.three.com" "14", "server.four.com" "9" } How can i get perl to return these 4 server names in th

sorting hash entries

2002-07-22 Thread dan
(sorry if this message comes twice.. didn't appear to have sent the first time) I have a small query regarding how to sort hash entries in numerical order. %usernum { "server.one.com" "15", "server.two.com" "5", "server.three.com" "14",

Sorting hash "values"

2002-12-30 Thread Rajendra Babu, Praveen
%hash = ( "h" => 100, "a" => 200, "z" => 50, "b" => 600 ); For the above %hash, I want to sort them by "values"(rather than keys) and print-out the sorted key-value pair. Can it be done ?? The output needs to look like the below: b 600 a 20

Sorting hash values

2006-04-04 Thread Baskaran Sankaran
Hi group, I am trying to process a hash (words as keys and frequency counts in an array as values). Instead of just sorting it by values, I want to sort it by the probabilities and I tried this... foreach $rule (sort {\&compute_probability($b) <=> \&compute_probability($a)} keys %rules_new) {

Problem sorting hash

2007-05-04 Thread leslie . polzer
Hello guys, I can't find the solution for sorting a two-dimensional hash. I'm sure some of you can help me. The first dimension of the hash has filenames in it, the second consists of two keys, 'data' and 'lines'. I want to sort the whole thing by a numerical comparison on 'lines' and tri

Re: sorting hash

2005-12-26 Thread John Doe
Anders Stegmann am Montag, 26. Dezember 2005 15.22: > Hi! Hello > I have a script like: > > %hash = qw(1 A 2 B 3 C); > while (($key, $value) = each %hash) { > print "$key => $value\n"; > } > > it prints out: > > 1 => A > 3 => C > 2 => B > > I want it to print out a sorted hash like: > > 1 =

RE: sorting hash

2005-12-26 Thread Charles K. Clarkson
Anders Stegmann wrote: : How do I do that? Use 'sort'. use strict; use warnings; my %hash = qw(1 A 2 B 3 C); foreach my $key ( sort { $a <=> $b } keys %hash ) { print "$key => $hash{$key}\n"; } __END__ The big question is: Are you using the right data

RE: sorting hash

2005-12-27 Thread Timothy Johnson
From: Charles K. Clarkson [mailto:[EMAIL PROTECTED] Sent: Mon 12/26/2005 6:40 AM To: beginners@perl.org Cc: Subject: RE: sorting hash Anders Stegmann <mailto:[EMAIL PROTECTED]> wrote: : How do I do that?

Sorting hash by element

2001-06-16 Thread Ron Anderson
Hi! Using the following hash as an example: $shash{"student1"} = join("\t", ("bob", "tyson", "room5")); $shash{"student2"} = join("\t", ("ron", "anderson", "room4")); $shash{"student3"} = join("\t", ("dave", "lee", "room2")); $shash{"student4"} = join("\t", ("tim", "barker", "room3")); $shash{"s

sorting hash after deref

2003-01-10 Thread Yacketta, Ronald
Folks, Can some one kindly slap me silly and show me where I went south? sub dbMonthlySelect() { my $query; my $result; $query = "select * from mbstats_se where STATDATE=TO_DATE('12/30/02','MM/DD/YY')"; $result = &doQuery($query,'

Re: sorting hash numerically

2003-02-04 Thread Pete Emerson
perldoc -q sort foreach $empNo (sort {$a<=>$b} keys %empName) { On Tue, 2003-02-04 at 08:17, Rob wrote: > Hi, I want to sort a hash based on the employee number; I used a foreach > loop but it sorts the hash based on the ascii value. How would I get it > to sort on integer values? -- To unsu

RE: sorting %hash entries

2002-07-22 Thread David . Wagner
rt {$a->[1] <=>$b->[1]} map{[$_,$usernum{$_}]} keys %usernum) { printf "%-s\n", $MyId->[0]; } Output: server.two.com server.four.com server.three.com server.one.com Wags ;) -Original Message----- From: dan [mailto:[EMAIL PROTECTED]] Sent: Monday, July 22, 2002 14:

Re: sorting %hash entries

2002-07-22 Thread John W. Krahn
Dan wrote: > > I have a small query regarding how to sort hash entries in numerical order. > > %usernum { "server.one.com" "15", > "server.two.com" "5", > "server.three.com" "14", > "server.four.com" "9" } > > How can i get perl to ret

Re: sorting hash entries

2002-07-22 Thread victor
the command 'sort' allow you to put in your own routine to do sorting. %usernum = ("server.one.com" => "15", "server.two.com" => "5", "server.three.com" => "14", "server.four.com" => "9"); @arr = sort {$usernum{$a} <=> $usernum{$b}} (keys %usernum); print j

Re: sorting %hash entries

2002-07-22 Thread dan
\n", $MyId->[0]; > } > > Output: > server.two.com > server.four.com > server.three.com > server.one.com > > > Wags ;) > -Original Message- > From: dan [mailto:[EMAIL PROTECTED]] > Sent: Monday, July 22, 2002 14:45 > To: [EMAIL P

Re: sorting %hash entries

2002-07-22 Thread Sudarshan Raghavan
On Tue, 23 Jul 2002, dan wrote: > ok.. that worked, now how about if i wanted it to go the other way.. from > most to least? foreach my $MyId (sort {$usernum{$a} <=> $usernum{$b}} keys (%usernum)) { print "$MyId\n"; } This will print server.two.com server.four.com server.three.com server.one

Re: sorting %hash entries

2002-07-23 Thread John W. Krahn
Dan wrote: > > ok.. that worked, now how about if i wanted it to go the other way.. from > most to least? my @sorted = sort { $usernum{$b} <=> $usernum{$a} } keys %usernum; John -- use Perl; program fulfillment -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [

RE: sorting %hash entries

2002-07-23 Thread David . Wagner
Subject: Re: sorting %hash entries ok.. that worked, now how about if i wanted it to go the other way.. from most to least? dan "David Wagner" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Here is one shot: > > > %usernum =

RE: Sorting hash "values"

2002-12-30 Thread Mark Anderson
3:16 PM To: '[EMAIL PROTECTED]' Subject: Sorting hash "values" %hash = ( "h" => 100, "a" => 200, "z" => 50, "b" => 600 ); For the above %hash, I want to sort them by "values

Re: Sorting hash "values"

2002-12-30 Thread Dave K
$ perl -e ' %hash = ( "h" => 100, "a" => 2000, "z" => 50, "b" => 600 ); for(sort { $hash{$b} <=> $hash{$a} } keys %hash) { print $hash{$_}, " = $_\n"; }' 2000 = a 600 = b 100 = h 50 = z HTH "Rajendra Babu" <[EMAIL PROTECTED]> wrote in message [EMAIL PROT

RE: Sorting hash "values"

2002-12-30 Thread Rajendra Babu, Praveen
h $key ( sort { $hash{$b} <=> $hash{$a} } keys %hash )" Can someone please explain ??? -Praveen -Original Message- From: Mark Anderson [mailto:[EMAIL PROTECTED]] Sent: Tuesday, 31 December 2002 10:23 AM To: Rajendra Babu, Praveen; [EMAIL PROTECTED] Subject: RE: Sorting hash &

RE: Sorting hash "values"

2002-12-30 Thread Wagner, David --- Senior Programmer Analyst --- WGO
the key. Wags ;) -Original Message- From: Rajendra Babu, Praveen [mailto:[EMAIL PROTECTED]] Sent: Monday, December 30, 2002 16:29 To: 'Mark Anderson'; [EMAIL PROTECTED] Subject: RE: Sorting hash "values" Hello /\/\ark, Thanks for your reply. The below code

Re: Problem sorting hash

2007-05-04 Thread leslie . polzer
On Fri, May 04, 2007 at 04:05:46AM -0700, John W. Krahn wrote: > my @toc_keys = sort { $toc{ $a }{ lines } <=> $toc{ $b }{ lines } } keys %toc; I don't think this will do what I want. I want the full hash structure preserved, not an array of the keys sorted by 'lines'... Leslie -- Personal

Re: Problem sorting hash

2007-05-04 Thread Jeff Pang
2007/5/4, [EMAIL PROTECTED] <[EMAIL PROTECTED]>: On Fri, May 04, 2007 at 04:05:46AM -0700, John W. Krahn wrote: > my @toc_keys = sort { $toc{ $a }{ lines } <=> $toc{ $b }{ lines } } keys %toc; I don't think this will do what I want. I want the full hash structure preserved, not an array of the

Re: Problem sorting hash

2007-05-04 Thread John W. Krahn
[EMAIL PROTECTED] wrote: > On Fri, May 04, 2007 at 04:05:46AM -0700, John W. Krahn wrote: > >>my @toc_keys = sort { $toc{ $a }{ lines } <=> $toc{ $b }{ lines } } keys %toc; > > I don't think this will do what I want. I want the full hash structure > preserved, not an array of the keys sorted by

Re: Problem sorting hash

2007-05-04 Thread leslie . polzer
On Fri, May 04, 2007 at 07:36:57PM +0800, Jeff Pang wrote: > Since you've got the sorted keys,can't you access the full hash? Well, it works this way -- thanks! But I wonder why it's not possible to sort a hash in a more intuitive way... Leslie -- Personal homepage: https://viridian.dnsalia

Re: Problem sorting hash

2007-05-04 Thread Martin Barth
On Fri, 4 May 2007 16:17:35 +0200 [EMAIL PROTECTED] wrote: > On Fri, May 04, 2007 at 07:36:57PM +0800, Jeff Pang wrote: > > > Since you've got the sorted keys,can't you access the full hash? > > Well, it works this way -- thanks! > > But I wonder why it's not possible to sort a hash in a more i

Re: Sorting hash values

2006-04-05 Thread Jeff Pang
> >And it doesn't work. Any help is appreciated. > Hello,I'd modify your script as follow,and it could work for me. use strict; use warnings; my %rules_new = (aaa => [11,22,33,44], bbb => [55,66,77,88], ); for my $rule (sort {&compute_probability($b) <=> &compu

Re: Problem sorting hash

2007-05-04 Thread Jeff Pang
2007/5/4, [EMAIL PROTECTED] <[EMAIL PROTECTED]>: Hello guys, I can't find the solution for sorting a two-dimensional hash. I'm sure some of you can help me. The first dimension of the hash has filenames in it, the second consists of two keys, 'data' and 'lines'. I want to sort the whole th

Re: Problem sorting hash

2007-05-04 Thread John W. Krahn
[EMAIL PROTECTED] wrote: > Hello guys, Hello, > I can't find the solution for sorting a two-dimensional hash. > I'm sure some of you can help me. perldoc -q "How do I sort a hash" > The first dimension of the hash has filenames in it, the second > consists of two keys, 'data' and 'lines'. > >

Sorting hash of hashes

2005-10-06 Thread Rose, Jeff
I have been trying to sort a hash but I cannot figure it out for the life of me The hash is in the form: my %message { messageid { From=> To=> T

Svar: RE: sorting hash

2005-12-26 Thread Anders Stegmann
Thanks for replying! I think I tried everything but that! Anders. Anders Stegmann Ph.d. student Royal Veterinary and Agricultural University Institute of Food Science Section of Food Microbiology Rolighedsvej 30 Building 2-74 Room R074 DK-1958 Frederiksberg C Tlf. +45 35 28 31 58 >>> "Charles

Re: Sorting hash by element

2001-06-16 Thread Peter Scott
At 09:15 AM 6/16/2001 -0700, Ron Anderson wrote: >Hi! > >Using the following hash as an example: > >$shash{"student1"} = join("\t", ("bob", "tyson", "room5")); >$shash{"student2"} = join("\t", ("ron", "anderson", "room4")); >$shash{"student3"} = join("\t", ("dave", "lee", "room2")); >$shash{"stude

Re: Sorting hash by element

2001-06-16 Thread Me
> $shash{"student1"} = join("\t", ("bob", "tyson", "room5")); > $shash{"student2"} = join("\t", ("ron", "anderson", "room4")); > $shash{"student3"} = join("\t", ("dave", "lee", "room2")); > $shash{"student4"} = join("\t", ("tim", "barker", "room3")); > $shash{"student5"} = join("\t", ("roger", "fa

Re: Sorting hash by element

2001-06-16 Thread Me
> But, if you did, I think this should work: But then it is saturday morning. Sigh. Ignore my attempt; use Peter's. > sub room { my $s = $shash{$_}; (split /\t/)[2] }; Wrong, twice. You wanted lastname, not room. And the split isn't working on the right thing. Peter's solution is clearer, n

Re: Sorting hash by element

2001-06-16 Thread Paul Johnson
On Sat, Jun 16, 2001 at 09:31:13AM -0700, Peter Scott wrote: > At 09:15 AM 6/16/2001 -0700, Ron Anderson wrote: > > > >And can I sort the hash by last name and then first name? > > Consider using instead a hash-of-hashes or hash-of-arrays(perldoc perllol). And when you need more efficiency type

Re: sorting hash after deref

2003-01-10 Thread Mark Goland
print "$i => $hash{$i}\n" if ( defined $hash{$i} ); } - Original Message - From: "Yacketta, Ronald" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, January 10, 2003 4:11 PM Subject: sorting hash

Re: Sorting hash of hashes

2005-10-06 Thread Jeff 'japhy' Pinyan
On Oct 6, Rose, Jeff said: I have been trying to sort a hash but I cannot figure it out for the life of me I've fixed a bit of the formatting below... my %message = ( $messageid => { From=> $from, To => $to, To_Num => $num, Sub_IP => $ip, Subject => $subject,

sorting hash list for CGI Form

2004-03-09 Thread Scott Taylor
Hello all, When I populate this hash (%SrcIDs) from "SELECT id, desc, from myTable order by desc" it doesn't order by the description field "desc". (printing each row in the while loop show that the SQL is sorted) while( my($id, $desc) = $sth->fetchrow ) { $SrcIDs{$id} = $desc; } $sth-

Re: sorting hash list for CGI Form

2004-03-09 Thread James Edward Gray II
On Mar 9, 2004, at 3:39 PM, Scott Taylor wrote: Hello all, Howdy. When I populate this hash (%SrcIDs) from "SELECT id, desc, from myTable order by desc" it doesn't order by the description field "desc". (printing each row in the while loop show that the SQL is sorted) See inlined change bel

Re: sorting hash list for CGI Form

2004-03-09 Thread R. Joseph Newton
Scott Taylor wrote: > Hello all, > > When I populate this hash (%SrcIDs) from "SELECT id, desc, from myTable > order by desc" it What does "it" refer to here? If you mean the SQL engine, which does care about the content of order clauses, you are mistaken. Your data set is returned in the prope

avoid repitive code while sorting hash arrays

2003-09-19 Thread Ramprasad A Padmanabhan
suppose I have a hash like %users =( 'cvs' => { 'uname' => 'cvs', 'uid' => 582, 'gid' => 500 }, 'radvd' => { 'uname' => 'radvd', 'u

Sorting Hash of arrays by how many elements

2003-02-03 Thread Paul Kraus
This is straight from the camel pg 277. Unless I misunderstand this then the items with 3 elements should be at the top not in the middle. What am I doing wrong? Can someone break down what the sort statement in this situation is doing. References are still confusing the hell out of me. My code

Re: avoid repitive code while sorting hash arrays

2003-09-19 Thread Rob Dixon
Ramprasad wrote: > suppose I have a hash like > > %users =( >'cvs' => { > 'uname' => 'cvs', > 'uid' => 582, > 'gid' => 500 > }, > 'radvd' => { > 'un

Re: avoid repitive code while sorting hash arrays

2003-09-19 Thread Chuck Fox
Rob and all the other perl wonder workers who contribute to this list, Awesome, While I have been reading and writing perl for a few years now, I am always amazed at the code reduction that can occur when you properly apply the power of perl. This is the most instructive forum that I have ever

Re: avoid repitive code while sorting hash arrays

2003-09-19 Thread Ramprasad A Padmanabhan
Rob Dixon wrote: Ramprasad wrote: suppose I have a hash like %users =( 'cvs' => { 'uname' => 'cvs', 'uid' => 582, 'gid' => 500 }, 'radvd' => { 'uname' => '

Re: avoid repitive code while sorting hash arrays

2003-09-19 Thread Rob Dixon
Ramprasad wrote: > > Rob Dixon wrote: > > > > > > Will this do? > > > > sort { > > my ($va, $vb) = map $$hash{$_}{$sortkey}, $direction eq 'a' ? ($a, $b) : ($b, > > $a); > > $sortkey eq 'uname' ? $va cmp $vb : $va <=> $vb; > > } keys %$hash; > > > > Cheers, > > > > Rob > > > > > > Gr8 Now the

Re: Sorting Hash of arrays by how many elements

2003-02-03 Thread Wiggins d'Anconia
See inline. Paul Kraus wrote: This is straight from the camel pg 277. Unless I misunderstand this then the items with 3 elements should be at the top not in the middle. What am I doing wrong? Can someone break down what the sort statement in this situation is doing. References are still confusi

Re: Sorting Hash of arrays by how many elements

2003-02-03 Thread Jenda Krynicky
From: "Paul Kraus" <[EMAIL PROTECTED]> > This is straight from the camel pg 277. > Unless I misunderstand this then the items with 3 elements should be > at the top not in the middle. What am I doing wrong? > > Can someone break down what the sort statement in this situation is > doing. Referenc

Re: Sorting Hash of arrays by how many elements

2003-02-03 Thread Peter Scott
In article <008301c2cbbd$15c27c40$8afea8c0@pkraus>, [EMAIL PROTECTED] (Paul Kraus) writes: >This is straight from the camel pg 277. >Unless I misunderstand this then the items with 3 elements should be at >the top not in the middle. >What am I doing wrong? > >Can someone break down what the sort

RE: Sorting Hash of arrays by how many elements

2003-02-04 Thread Paul Kraus
DOHT! Ya that would do it wouldn't it. Thanks. -Original Message- From: Jenda Krynicky [mailto:[EMAIL PROTECTED]] Sent: Monday, February 03, 2003 6:16 PM To: Perl Subject: Re: Sorting Hash of arrays by how many elements From: "Paul Kraus" <[EMAIL PROTECTED]> &g

An Old Question on Sorting Hash of Arrays by Array element and th en by key

2004-02-18 Thread Smith Jeff D
I am trying to sort a hash of arrays that is similar to the example below. I have a hash of arrays that I want to sort, first by the first element of the array, then by the key to the hash and don't care about other elements of the array (for sorting and without regard to case. %HofA = (orange=>[

Re: An Old Question on Sorting Hash of Arrays by Array element and then by key

2004-02-19 Thread WC -Sx- Jones
%HofA = (orange=>['ZZZ', 'ANDY'], red=>['AAA', 'AL'], blue=>['mmm','Betty'], yellow=>['aaa', 'ZEUS'], green=>['DDD','Mary Joe'], violet=>['MMM','Hugo'] ); my @ordered_keys = sort { $HofA{$a}[0] cmp $HofA{$b}[1] ||

Re: An Old Question on Sorting Hash of Arrays by Array element and th en by key

2004-02-18 Thread James Edward Gray II
On Feb 18, 2004, at 1:58 PM, Smith Jeff D wrote: I am trying to sort a hash of arrays that is similar to the example below. I have a hash of arrays that I want to sort, first by the first element of the array, then by the key to the hash and don't care about other elements of the array (for sor

Re: An Old Question on Sorting Hash of Arrays by Array element and th en by key

2004-02-18 Thread Mark LoBue
At 03:49 PM 2/18/2004, James Edward Gray II wrote: >On Feb 18, 2004, at 1:58 PM, Smith Jeff D wrote: > >>I am trying to sort a hash of arrays that is similar to the example below. >>I have a hash of arrays that I want to sort, first by the first element of >>the array, then by the key to the hash a

Re: An Old Question on Sorting Hash of Arrays by Array element and th en by key

2004-02-18 Thread James Edward Gray II
On Feb 18, 2004, at 6:16 PM, Mark LoBue wrote: At 03:49 PM 2/18/2004, James Edward Gray II wrote: On Feb 18, 2004, at 1:58 PM, Smith Jeff D wrote: I am trying to sort a hash of arrays that is similar to the example below. I have a hash of arrays that I want to sort, first by the first element o

RE: An Old Question on Sorting Hash of Arrays by Array element an d th en by key

2004-02-19 Thread Smith Jeff D
key and value for the HofA somehow?? -Original Message- From: James Edward Gray II [mailto:[EMAIL PROTECTED] Sent: Wednesday, February 18, 2004 6:49 PM To: Smith Jeff D Cc: [EMAIL PROTECTED] Subject: Re: An Old Question on Sorting Hash of Arrays by Array element and th en by key On Feb

Re: An Old Question on Sorting Hash of Arrays by Array element an d th en by key

2004-02-19 Thread WC -Sx- Jones
Smith Jeff D wrote: Thanks for the feedback--maybe I screwed up but what happens for me is that the ordered array (1) only lists the keys, not the array values the hash key points to and (2) I still don't get an ordered list of the keys that are put in the "ordered" array--it comes out un-ordered.

Re: An Old Question on Sorting Hash of Arrays by Array element an d th en by key

2004-02-19 Thread James Edward Gray II
On Feb 19, 2004, at 10:25 AM, Smith Jeff D wrote: Thanks for the feedback--maybe I screwed up but what happens for me is that the ordered array (1) only lists the keys, not the array values the hash key points to and (2) I still don't get an ordered list of the keys that are put in the "ordered

Re: An Old Question on Sorting Hash of Arrays by Array element an d th en by key

2004-02-19 Thread Rob Dixon
can it??--wouldn't it be better to do a while/each and get both key and > value for the HofA somehow?? > > -Original Message- > From: James Edward Gray II [mailto:[EMAIL PROTECTED] > Sent: Wednesday, February 18, 2004 6:49 PM > To: Smith Jeff D > Cc: [EMAIL PROTECT

RE: An Old Question on Sorting Hash of Arrays by Array element an d th en by key

2004-02-19 Thread Smith Jeff D
riginal Message- From: James Edward Gray II [mailto:[EMAIL PROTECTED] Sent: Thursday, February 19, 2004 11:37 AM To: Smith Jeff D Cc: '[EMAIL PROTECTED]' Subject: Re: An Old Question on Sorting Hash of Arrays by Array element an d th en by key On Feb 19, 2004, at 10:25 AM, Smith Jeff D

Re: An Old Question on Sorting Hash of Arrays by Array element an d th en by key

2004-02-19 Thread WC -Sx- Jones
Smith Jeff D wrote: I really need to order both the keys and one of the elements in the array stored as a value in the hash, preferably sort first on the first element of the array (my real application has four elements but the snippet I'm testing with has a two-element array) and then sort secondl

Re: An Old Question on Sorting Hash of Arrays by Array element an d th en by key

2004-02-19 Thread Rob Dixon
Jeff Smith wrote: > > I really need to order both the keys and one of the elements in the array > stored as a value in the hash, preferably sort first on the first element of > the array (my real application has four elements but the snippet I'm testing > with has a two-element array) and then sort

Re: An Old Question on Sorting Hash of Arrays by Array element an d th en by key

2004-02-19 Thread James Edward Gray II
On Feb 19, 2004, at 10:48 AM, Smith Jeff D wrote: I really need to order both the keys and one of the elements in the array stored as a value in the hash, preferably sort first on the first element of the array (my real application has four elements but the snippet I'm testing with has a two-el

Re: An Old Question on Sorting Hash of Arrays by Array element an d th en by key

2004-02-19 Thread James Edward Gray II
On Feb 19, 2004, at 3:20 PM, Smith Jeff D wrote: Thanks, I must have missed it--I'll be getting back to it tomorrow morning to see what I missed in the original response. I thought I had run as printed below. No worries. You probably did run my original response, which was flawed. Mark gave a

RE: An Old Question on Sorting Hash of Arrays by Array element an d th en by key

2004-02-19 Thread Smith Jeff D
irst I was trying to nest the sorts rather than logically or'ing them together and it wasn't working. -Original Message- From: James Edward Gray II [mailto:[EMAIL PROTECTED] Sent: Thursday, February 19, 2004 3:12 PM To: Smith Jeff D Cc: '[EMAIL PROTECTED]' Subject:

Re: An Old Question on Sorting Hash of Arrays by Array element an d th en by key

2004-02-19 Thread Rob Dixon
James Edward Gray II wrote: > > The Moral: Don't use the original message. Use this one. Far more reliable is: "Don't do what I say, do what I mean." :) Rob -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: An Old Question on Sorting Hash of Arrays by Array element an d th en by key

2004-02-19 Thread John W. Krahn
Rob Dixon wrote: > > James Edward Gray II wrote: > > > > The Moral: Don't use the original message. Use this one. > > Far more reliable is: "Don't do what I say, do what I mean." :) After all, Perl is a DWIM language. :-) John -- use Perl; program fulfillment -- To unsubscribe, e-mail: [E

Re: An Old Question on Sorting Hash of Arrays by Array element an d th en by key

2004-02-20 Thread R. Joseph Newton
Smith Jeff D wrote: > Thanks for the feedback--maybe I screwed up but what happens for me is that > the ordered array (1) only lists the keys, not the array values the hash key > points to and (2) I still don't get an ordered list of the keys that are put > in the "ordered" array--it comes out un-

RE: An Old Question on Sorting Hash of Arrays by Array element an d th en by key

2004-02-20 Thread Smith Jeff D
ect: Re: An Old Question on Sorting Hash of Arrays by Array element an d th en by key On Feb 19, 2004, at 3:20 PM, Smith Jeff D wrote: > Thanks, I must have missed it--I'll be getting back to it tomorrow > morning > to see what I missed in the original response. I thought I had run as