PadWalker is a module which allows you to inspect (and even change!) lexical variables in any subroutine which called you. It will only show those variables which are in scope at the point of the call. WWW: http://search.cpan.org/dist/PadWalker/