package private; our $my_scalar = 'my scalar'; our @my_array = qw(my array); our %my_hash = ( my => 'hash' ); package main; use strict; use Devel::Symdump; print "ARRAYS => " . join(q{, }, Devel::Symdump->arrays("private")),"\n"; print "SCALARS => " . join(q{, }, Devel::Symdump->scalars("private")),"\n"; print "HASHES => " . join(q{, }, Devel::Symdump->hashes("private")),"\n"; # yields the following __END__ ARRAYS => private::my_array SCALARS => private::my_scalar, private::my_array, private::my_hash HASHES => private::my_hash #### package private; our $my_scalar = 'my scalar'; our @my_array = qw(my array); package main; use strict; use Data::Dumper; # attempt to access the ARRAY portion of a scalar *my_scalar_glob = $private::{my_scalar}; print "ARRAY portion of a scalar glob: " . Dumper(*my_scalar_glob{ARRAY}); # attempt to access the SCALAR portion of an array *my_array_glob = $private::{my_array}; print "SCALAR portion of an array glob: " . Dumper(*my_array_glob{SCALAR}); __END__ # prints the following ARRAY portion of a scalar glob: $VAR1 = undef; SCALAR portion of an array glob: $VAR1 = \undef;