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

How can I apply regular expressions to the debugging command V so that I can, for instance, print out the values of all the variables from the script I'm debugging, but none of the environmental variables?
Thanks,
Ntav
N.A.P.H.
NOT another perl hacker

Replies are listed 'Best First'.
Re: debugging commands
by kschwab (Vicar) on Sep 09, 2001 at 02:24 UTC
    The syntax is V [pkg [vars]]. You can use regex patterns for the vars if you provide either a leading ~ or ! ( for negation).

    Some examples:

    V main !\w ( print vars in main that have a non-word character in them) V main ~_ ( print vars in main with an underscore in them)
    Hope this helps.
      thanks, it was the regex syntax being slightly different from =~ m// which threw me.
      Ntav