#!/usr/bin/perl use strict; use warnings; my @searchable; BEGIN { @searchable = qw(...); # the list to include foreach my $module (@searchable) { eval "use $module"; if ( $@ ) { die "error using: $module\n"; } } } #### use Params::Check qw(check);