Show how you would read the status of 100 students and then print the total number of students who are married, single, widowed, divorced.
perl code:
foreach my $i (1..100) {
my $status = <STDIN>;
chomp $status;
$count{$status}++;
}
print "STATUS COUNT\n";
foreach my $key (sort keys %count) {
print "$key: $status{$key}\n";
}