Showlex

Shows lexical variables used in functions or files. Invoke as:

perl -MO=Showlex[,sub] filename


If sub is provided and is the name of a subroutine in file filename, B::Showlex prints the lexical variables used in that subroutine. Otherwise, it prints the file-scope lexicals in filename.