HelenCr has asked for the wisdom of the Perl Monks concerning the following question:

Hi experts

Sorry if this is a newbie question. I can't seem to find a response for this question:

In Padre, how do I view/examine the values of Perl "special variables" (like $_, or $/, for example?)
It seems that the "view" button lists a variable's value only if you highlight it in the editor. But Perl's special variables are not part of the explicit program code.

TIA - Helen

  • Comment on Padre: how to examine Perl special variables

Replies are listed 'Best First'.
Re: Padre: how to examine Perl speical variables
by choroba (Cardinal) on Feb 10, 2012 at 17:32 UTC
    Crossposted at StackOverflow. It is considered polite to inform about crossposting so people do not waste their time on solving problems already solved at other sites.
      Noted
Re: Padre: how to examine Perl speical variables
by Anonymous Monk on Feb 10, 2012 at 17:11 UTC

    Hmm, its been a while since I used Padre (installing now) but I can't recall what button you are talking about; Alt+File+What+What.... ?

      open a perl file then

      Alt+Debug+Show Debugger

      And debugger tab shows up on the right on top of outline

      Press run debugger button (some kind of catterpillar)

      Then press next button (n) to step over, and variables will show in list if you have "Show Local Variables (y 0)" checked

      However, "Show Global Variables" is greyed out

      padre debugger show global variables -> http://padre.perlide.org/trac/wiki/Features/Perl5Debugger

      I have been getting perl debug errors, see POD below, so you might notice it is automaticly disabled when I think it is unsafe, then re-enable.

      If you want to see @ISA|@INC|%ENV|%SIG use the p|x button.

      Clicking the "p|x" button works to show the value of  $_. Enter @INC or any other variable in the textbox and press "p|x" button again to see it in "Debug Output"

        I don't understand. I run padre, then I "open" a program (*.pl file). Then, there is a "Debug" menu item (not "Alt"). The "Debug" menu item drops down with these options: step in/out/over, run to breakpoint, jump to curr. line, breakpoints etc., show variable value, show stack trace, quit debugger.

        I don't see "Show local variables (y 0)" like you mention.

        It's Padre 0.86 on Windows 7 x64.
        Anonymous Monk wrote: "Clicking the "p|x" button works to show the value of $_ . Enter @INC or any other variable in the textbox and press "p|x" button again to see it in "Debug Output"

        Where can I find the "p|x" button and the "text box"? Are you talking about Padre?