Home > Uncategorized > hash list in perl

hash list in perl

January 31st, 2008 admin Leave a comment Go to comments

How to list all defined variables in perl?

I have seen somewhere that the global variables are part of a hash. Possibly called main dictionary or something like that. Can’t find it now anymore. I need to list all defined variables or at least the global ones.
Thanks for the idea with debugger.

I want to do the same what debugger does automatically in my program to perform some check on size of all variables etc.

remember perl variables don’t exist until they’re referenced.

“main” is the default package.

Easest way to dump all variables is using the debugger. Let’s say you want to know the variables that exist at line 105.

perl -d script
c 105 # continue to line 105
V # cap V… dump all variables

p6apclps #15 Perl 6 Apocalypse


Learning Perl on Win32 Systems


Learning Perl on Win32 Systems


$15.13


In this smooth, carefully paced course, leading Perl trainers and a Windows NT practitioner teach you to program in the language that promises to emerge as the scripting language of choice on NT. With a foreword by Larry Wall, the creator of Perl, this book is the “official” guide for both formal (classroom) and informal learning. Based on the “llama book,” Learning Perl on Win32 Systems fea…

Share and Enjoy:
  • Print
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
  • Blogplay

Categories: Uncategorized Tags:
  1. No comments yet.
  1. No trackbacks yet.

Comment moderation is enabled. Your comment may take some time to appear.