I'm trying to do this (the examples are core modules just to make the point):
no strict; my @required = ( File::Basename, File::Copy, File::Find ); use strict; my @missing; foreach (@required) { eval { require }; push @missing, $_ if $@; }
But it does not work ("Can't locate File::Basename..." etc). What's the problem and is there any way around it?
In reply to eval array of required modules by halfcountplus
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |