- or download this
my $alias_line_count = 0; # Number of aliases I have
my @alias_label_array = ();
...
my @ap_value_array = ();
my $ap_line_count = 0; # Number of APs I have
my $ap_person_count = -1; # Eh? I don't know...
- or download this
# Print the data for officer 'Joe'
for my $i (0 .. $officer_count-1) {
...
print "Joe: $officer_value_array[$i]\n";
}
}
- or download this
for my $i (0 .. $#officer_label_array) {
if ($officer_label_array[$i] eq 'Joe') {
print "Joe: $officer_value_array[$i]\n";
}
}
- or download this
for my $i (0 .. $#officer_label_value_array) {
if ($officer_label_value_array[$i][0] eq 'Joe') {
print "Joe: $officer_label_value_array[$i][1]\n";
}
}
- or download this
for my $array_reference (@officer_label_value_array) {
my ($name, $value) = @$array_reference;
print "$name: $value\n" if $name eq 'Joe';
}
- or download this
my $name = 'Joe';
print "$name: $officer_hash{$name}\n" if exists $officer_hash{$name};
- or download this
my %aliases = {
# Name Title
...
# How many officers do we have, anyway?
print "We have ", scalar(keys %officers), " officers.\n";