- or download this
# return a list consisting of correct division and service
# as a function of $dcr_type and @row
sub division_service {
...
croak "Unknown \$dcr_type '$dcr_type'";
}
}
- or download this
# return a list consisting of correct division and service
# as a function of $dcr_type and @row
sub division_service {
...
(($row->[0] eq 'Headquarters' ? 'HQ' : $row->[2]), undef)
+:
croak "Unknown \$dcr_type '$dcr_type'";
}
- or download this
# return a list consisting of correct division and service
# as a function of $dcr_type and @row
sub division_service {
...
return &{$map{$dcr_type} || croak "Unknown \$dcr_type '$dcr_type'"
+}();
}
- or download this
BEGIN {
my ($row, %map);
...
sub { ($row->[0] eq 'Headquarters' ? 'HQ' : $row->[2]), un
+def },
);
}