in reply to Pseudo-hash intrusion...
First, @$foo is an arrayref, not a hashref. You can make it seem like a hashref by the @{$foo} thingies.
Second, just do this.
I might be wrong on this because I am not too familiar in the area, please point it out to me if I am. Thank you.
UPDATE:jeffa has pointed out to me how I could fix this...
Second, just do this.
my @bar = sort{@{$foo->{$a}} cmp @{$foo->{$b}}} @$foo;
I might be wrong on this because I am not too familiar in the area, please point it out to me if I am. Thank you.
UPDATE:jeffa has pointed out to me how I could fix this...
my @bar = sort{$foo->{$a} cmp $foo->{$b}} @$foo;
$_.=($=+(6<<1));print(chr(my$a=$_));$^H=$_+$_;$_=$^H; print chr($_-39); # Easy but its ok.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Re: Pseudo-hash intrusion...
by Brovnik (Hermit) on Jun 21, 2001 at 19:58 UTC |
In Section
Seekers of Perl Wisdom