- or download this
if ($type == "INTEGER") {
$convAnswer = checkInteger($answer);
...
die qq(There is no such type as "$type"\n);
}
- or download this
my $sub = "check" . ucfirst(lc($type));
if (not defined (&{$sub}) {
die qq(There is no such type as "$type"\n);
}
$convAnswer = &{$sub}($answer);
- or download this
my $sub = "check" . ucfirst(lc($type));
if (not defined (&{$sub}) {
...
no strict "refs";
$convAnswer = &{$sub}($answer);
use strict "refs"