Without eval, you would have to convert the module name to a file path before passing it to require.... my $q = CGI->new; my %modules = ( simple => 'Filter::Simple', hard => 'Filter::Util::Call' ); my $filter = $q->param("filter"); if(exists $modules{$filter}) { eval "require $modules{$filter}"; } ...
In reply to Re: eval string possibilities
by Arunbear
in thread eval string possibilities
by erix
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |