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