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
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
[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
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
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
[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'.
>
>
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