my $Cmdref; #---------- # Using symbolic references to get code files into name space no strict refs; eval "our %${name}Cmd; do 'db/${name}Cmd.pm'; $Cmdref= \%${name}Cmd;"; use strict refs; #----------- ... foreach $cmd (keys %$Cmdref) { ... $opcode = sprintf("0%x",$Cmdref->{$cmd}{fixed_pattern}); #### my %ThingyCmd= ... push @main::allCmd,\%ThingyCmd;