for my $sysName ( keys %systemList ) { ## Loop through system types $logger->msg("loading class $sysName",0); eval "require $sysName"; ## include the proper module file if ($@) { $logger->msg("Package $sysName not found.",3); next; } ## instantiate the new object my $obj = new ${sysName}( @{$systemList{$sysName}} ); ### etc... }