Listing Perl built in variables

From: Dan Muey (dmuey_at_infiniplex.com)
Date: 12/29/03


Date: Mon, 29 Dec 2003 11:53:06 -0600
To: <beginners@perl.org>

Howdy all,

I was curious if there is a way to simply list all of perl's built in variables and their values.

Something similar to listing the Environmental variables buy doing:

for(keys %ENV) { print "$_ is $ENV{$_}\n"; }

...
QUERY_STRING is foo=bar
HTTP_USER_AGENT is Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.0.2) Gecko/20030208 Netscape/7.02
PATH is /sbin:/bin:/usr/sbin:/usr/bin
...

But I'd like to list the variables like $/ $@ etc...

...
0 is varlist.pl
) is 1000 0 1000 1000
| is 0
...

Any thoughts?

I didn't see any ways except manually doing printing each one by hand. Or putting the characters in an array and doing a for(@builtinvariablecharacters) { print "$_ is ${$_}\n"; }
Which would be perfect if there's an easy way to build that array without having to populate it manually.

TIA

Dan



Relevant Pages

  • Re: Using a module in a query
    ... >> any built in function. ... >> builder. ... >> for built in functions and also a listing with your ... >> them you will see the custom functions they contain. ...
    (microsoft.public.access.queries)
  • Re: printing format
    ... How about copying that range into MSWord and using Word's built in features. ... pick up your listing and toss the word file--it's out of date as ...
    (microsoft.public.excel.misc)
  • Re: I have built a Time Machine
    ... > I have built a time machine believe it or not and... ... So why are you obstructing justice by not listing their names and their ...
    (sci.physics)
  • RIP False Positives
    ... Howdy, we have a hardware firewall deployed that has built in IDS. ... exactly sure what the IDS is, it's built into the SMC firewall -- I will ...
    (comp.security.firewalls)
  • Re: Saerch results - server name mapping problem
    ... Use a relative path URL for these listings. ... > Listing" page. ... > Anyone any suggestion to fix this? ...
    (microsoft.public.sharepoint.portalserver)