- or download this
print "$member can be found " . scalar(@{$family{$member}}) / ? . ": "
- or download this
#!/usr/bin/perl
use Data::Dumper; # only for teaching purpose
...
print "$member can be found " . scalar(@{$family{$member}}) . ": "
. join(" ", @{$family{$member}}) . "\n";
}
- or download this
FLINTSTONES=BARNEY, FRED, WILMA
JETSONS=MAX, TONY, WILMA
SIMPSONS=LISA, BARNEY, WILMA, HOMER
ALCATRAZ=ELIJAH, MAX, WILMA
- or download this
sub nice_list {
return '' if @_ == 0;
...
(@$eaters), "\n");
}
}
- or download this
BARNEY can be found 2: FLINTSTONES SIMPSONS
FRED can be found 1: FLINTSTONES
WILMA can be found 4: FLINTSTONES JETSONS SIMPSONS ALCATRAZ
MAX can be found 2: JETSONS ALCATRAZ
and so forth...