in reply to import() when require-d module name is variable

(...) on the Internet (the whole Internet!)

Then CPAN is not on the Internet?

require UNIVERSAL::require; my $module_name = 'Regexp::Common'; $module_name->use(qw /comment number/); my $test = '123.456'; print $test =~ $RE{num}{real} ? 'A number' : 'Something else';
UNIVERSAL::require does all you want.

CountZero

A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James