Run your program in the perl debugger. After it, you can print the values of assigned global variables with the |V debugger command. Note that this will print only those variables, that were used, so run the program first and break it after you think it's set all the global variables it uses, and invoke |V only after that. Also, you'll see lots of magic variables and other such junk in the output, which you should ignore.
Then, if you also want to know where those variables are accessed or changed, see Debugging with tied variables, or just grep for their names in the source code.
(Running with strict and seeing the errors is also a good idea, and is probably simpler, as someone else has recommended.)
In reply to Re: grepping out global vars?
by ambrus
in thread grepping out global vars?
by tphyahoo
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |