you're right.
in the original example i stole this from, there were
some function calls and data tests. without them,
this is overly complex .
Angus Lees wrote:
> On Mon, May 14, 2001 at 05:14:31PM -0700, ___cliff rayman___ wrote:
> > if by value order by key order then:
> > @application_k =
> > map {$_->[0]}
> > sort {$a->[1] <=> $b->[1] || $a->[0] cmp $b->[0]}
> > map {[$_ , $GSIS::PROD_APPLICATION{$_}]}
> > keys %GSIS::PROD_APPLICATION;
> >
> > the second one is called a schwartzian transform. u should be
> > able to find an explanation of it on the web.
>
> i don't get it. why not just do:
>
> *h = \%GSIS::PROD_APPLICATION; # just to make the example shorter..
>
> @k = sort {$h{$a} <=> $h{$b} || $a cmp $b} keys %h;
>
> --
> - Gus
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
--
___cliff [EMAIL PROTECTED]http://www.genwax.com/
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]