Help for this page

Select Code to Download


  1. or download this
    while (my $row = $sth->fetchrow_hashref) {
          $$patients{$row->{'pat_id'}} ||= {
    ...
          }
          $x++;
    }
    
  2. or download this
    my %sorted =
    sort { $patients->{$a}{old_file} cmp $patients->{$b}{old_file} }
       (keys %{$patients});
    my $patients = \%sorted;
    # or put { } around the sort expression to do it one line.
    
  3. or download this
    sort { $$patients{$a}->{old_file} cmp $$patients{$b}->{old_file} }