Hello all,

My hash keys look something like this:

>1234 x5

So I am thinking a cmp, as opposed to <=> is best.

What I want is for the keys to be sorted as follows:

>1 x....
>2 x....
>3 x....
..
..
..
>n x....

This is what I have in my script at the moment:

my @sort_this = keys %final_list;
my @sorted = sort { $a cmp $b } @sort_this;
for (@sorted) { print OUT "$_\n$final_list{$_}\n" }

This gives

>1 x....
>10 x....
>100 x....
>1000 x....
>1001 x....

etc.

Any suggestions?  I'm not asking for you to spell it out for me with code and 
all unless you really want to.  Sorry if this is a dumb question.

cheers,

nathanael

"I think for my lunch tomorrow I'll make a tuna and pickle triangle bunwich."


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to