in reply to Trying to get around the "use strict 'refs'" Issue
Instead of using symbolic references, use a dispatch table.
(untested)my $table = { INTEGER => \&checkInteger, DATE => \&checkDate, IPADDRESS => \&checkIpaddress, FOO => \&checkFoo }; if( defined $table->{uc $type} ) { $table->{uc $type}( $answer ); }
update: added untested code snippet
|
|---|