- or download this
SELECT department, count(department)
FROM table
GROUP BY department
- or download this
use strict;
...
}
keys %testhash;
print( "$musicstudents\n" );
- or download this
my %outputhash = somefunction(\%testhash, 'department');
- or download this
# my %outputhash = ( music => 3,
# chemistry => 2 );
- or download this
my %outputhash;
$outputhash{$_->{department}}++ for grep { $_->{department}
} values %testhash;