Help for this page

Select Code to Download


  1. or download this
    while ( $sth->fetchrow()  ) {
        push @classes, {
    ...
            count      =>      $count
        };
    }
    
  2. or download this
    @departments = (
        {
    ...
    
         etc ...
    );
    
  3. or download this
    my %departments;
    push @{ $departments{ $_->{department} }{classes} }, $_ foreach (@clas
    +ses);
    ...
    my @departments = map {
        $_->{department} = $_->{classes}[0]{department}; $_
    } values %departments;