(1) given a string containing the name of a scalar,
how would I tell if that variable already exists in the symbol table?

i.e. given "MyPackage::Varname", how would I tell if
$MyPackage::Varname was already declared?
and if it is an array reference?


(2) given a reference to an array, would it be possible to
convert that reference back into a package name?

i.e. how would I get this code:

package MyOtherPackage;
our $FancyArrayRef= [ 1,2,3 ];

my $arrref=$FancyArrayRef;

my $name = magicsubroutinehere($arrref);

to end up with $name equal to "MyOtherPackage::FancyArrayRef"?






_______________________________________________
Boston-pm mailing list
[email protected]
http://mail.pm.org/mailman/listinfo/boston-pm

Reply via email to