Help for this page

Select Code to Download


  1. or download this
    if ($type == "INTEGER") {
        $convAnswer = checkInteger($answer);
    ...
        die qq(There is no such type as "$type"\n);
    }
    
  2. 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);
    
  3. or download this
    my $sub = "check" . ucfirst(lc($type));
    if (not defined (&{$sub}) {
    ...
    no strict "refs";
    $convAnswer = &{$sub}($answer);
    use strict "refs"