Help for this page

Select Code to Download


  1. or download this
    # Place all the hash data into an array of pipe-seperated values for s
    +orting
    foreach my $key (keys %test) {
    ...
    for (@sorted) {
    $_ = "$_\n";
    }
    
  2. or download this
    # Sort the data by the number in the last part of the array
    @sorted = 
    ...
        keys %test;
    # rebuild array of pipe-seperated values, and put the line breaks back
    + in
    $_.="|$test{$_}[0]|$test{$_}[1]|$test{$_}[2]|$test{$_}[3]\n" for(@sort
    +ed);