User Profile

Collapse

Profile Sidebar

Collapse
cici
cici
Last Activity: Apr 10 '08, 12:28 PM
Joined: Apr 1 '08
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • cici
    replied to Hash sort weirdness
    in Perl
    Ahh...I missed that. Now that I have that part corrected...I have tried to sort using both cmp and <=>...both are returning the same results which is:

    2008-03-24
    New 1 Month Subscription 1
    New 12 Month Subscription 5
    New 14 Day Trial Subscription 3
    New 6 Month Subscription 6

    I understand that is it using the ASCII value to sort right now, which is not what I want....
    See more | Go to post

    Leave a comment:


  • cici
    started a topic Hash sort weirdness
    in Perl

    Hash sort weirdness

    I am having trouble sorting secondary keys in a multi-level hash. I have a sample program that exhibits the problem...the following code is sorting New 6 Month before New 1 Month. What am I doing wrong?

    Thanks in advance.

    Code:
    #!/usr/bin/perl
    
    
    my %data = (
           "2008-03-24" => {
                     "New 1 Month Subscription" => {
    ...
    See more | Go to post
No activity results to display
Show More
Working...