Zhris has asked for the wisdom of the Perl Monks concerning the following question:
foreach my $colour ( sort { if ($products{'Cat'}{'Pro'}{$a}{'Qua'} <= 0) {return 1;} elsif ($products{'Cat'}{'Pro'}{$b}{'Qua'} <= 0) {return -1;} } sort {$a <=> $b || $a cmp $b} keys %{$products{'Cat'}{'Pro'}} ) {
Colour Quantity 70 (Grey brown mix) 3 72 (Green mix) 10 74 (Fuschia mix) 8 76 (Mauve mix) 11 77 (Blue mix) 6 90 (Beige pink mix) 12 91 (Peach cream mix) 8 92 (Silver cream mix) 10 93 (Beige blue mix) 9 78 (Black white mix) 0 75 (Red mix) 0 73 (Aqua mix) 0 71 (Beige mix) 0
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Complex conditional sort
by Limbic~Region (Chancellor) on Mar 09, 2011 at 00:19 UTC | |
|
Re: Complex conditional sort
by GrandFather (Saint) on Mar 09, 2011 at 00:29 UTC | |
|
Re: Complex conditional sort
by wind (Priest) on Mar 09, 2011 at 00:43 UTC | |
by ikegami (Patriarch) on Mar 09, 2011 at 01:48 UTC | |
by wind (Priest) on Mar 09, 2011 at 03:50 UTC | |
by ikegami (Patriarch) on Mar 09, 2011 at 07:15 UTC | |
by wind (Priest) on Mar 09, 2011 at 19:27 UTC | |
| |
by Anonymous Monk on Mar 09, 2011 at 01:17 UTC | |
by ikegami (Patriarch) on Mar 09, 2011 at 01:36 UTC | |
by Anonymous Monk on Mar 09, 2011 at 03:57 UTC | |
by ikegami (Patriarch) on Mar 09, 2011 at 07:06 UTC | |
| |
|
Re: Complex conditional sort
by ikegami (Patriarch) on Mar 09, 2011 at 00:12 UTC | |
by Limbic~Region (Chancellor) on Mar 09, 2011 at 00:22 UTC | |
by ikegami (Patriarch) on Mar 09, 2011 at 00:37 UTC | |
|
Re: Complex conditional sort
by Zhris (Initiate) on Mar 09, 2011 at 04:32 UTC | |
|
Re: Complex conditional sort
by salva (Canon) on Mar 09, 2011 at 09:54 UTC |