in reply to Importing Symbol Tables

No offense but mass importing of tons of variables is a really really bad idea. If you want to use globals, why not just give them their own short package name like so.
package CFG;

So at least looking at your source 3 months later it's clear what the hell $CFG:this is and you won't step on any variables in the scripts or vice/versa unintentionally.

But to give you enough rope to hang yourself, you could do something like this.
package other; $VAR = 'SCALAR'; @array = ('ARRAY') x 4; my @exports = qw ($VAR @array); sub import { no strict 'refs'; my $used_name = shift; # Remove the use name my $that_pack = caller(); foreach (@exports){ m/^([\@\$\*\&\%])(\w+)/; my ($t,$v) = ($1,$2); # Selectively assign to typeglobs. *{$that_pack.'::'.$v} = $t eq '@' && \@{$v} || $t eq '%' && \% +{$v} || $t eq '&' && \&{$v} || $t eq '$' && \$ +{$v} || $t eq '*' && \*{$v}; } } package main; other::import(); foreach (sort keys %main::){ print __PACKAGE__,"\:\:$_ = $main::{$_}\n"; } warn "\$VAR is $VAR"; warn join(", ",@array);

Update:
Fixed typo in code.
Update:Fixed
Ran into another snag. Seemed to work on win but no nix. Fixed. If anyone knows and easier way. Let me know.
If you want to use this, use maintained code HERE

-Lee

"To be civilized is to deny one's nature."