I want to do something like this in Perl:
$Module1="ReportHashFile1"; # ReportHashFile1.pm
$Module2="ReportHashFile2"; # ReportHashFile2.pm
if(Condition1)
{
use $Module1;
}
elsif(Condition2)
{
use $Module2;
}
ReportHashFile*.pm contains a package ReportHashFile* .
Also how to reference an array inside module based on dynamic module name?
@Array= @$Module1::Array_inside_module;
Is there anyway I can achieve this. Some sort of compiler directive?