Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

Hi Monks,
I was looking for a way to see the callers private variables from another sub without passing them as arguments at all, or using globals or changing the caller in any way. Such as in:
package Someone::Private; sub very_private { my $name = shift; peek_me; } package My::Snoop; sub peek_me { my $name = #?????; print 'I can see your house from here: '.$name; }
cheers
miguel

Replies are listed 'Best First'.
Re: callers variables
by moritz (Cardinal) on Apr 25, 2009 at 20:10 UTC
      Brilliant! thanks.