in reply to Importing Symbol Tables
As for importing all the variables in the symbol table you could do something like thisprint $a::fred;
This should import all the symbols of the foo symbol table into the main symbol table. But I imagine you have more constructive uses for symbol munging than polluting the main namespace, and of course you'll be using strict all the while ;-)package foo; $x = "a string"; @y = qw(an array); %z = qw(a hash); sub func1 { print "in foo:: \n" } 1; package main; foreach my $sym (keys %foo::) { *{"main::$sym"} = *{"foo::$sym"}; }
broquaint
|
|---|