B::Showlex3pm
Show lexical variables used in functions or files
Usage
perl -MO=Showlex[,SUBROUTINE] foo.pl
Overview
When a subroutine name is provided in OPTIONS, prints the lexical variables used in that subroutine. Otherwise, prints the file-scope lexicals in the file.