Listing Perl built in variables
From: Dan Muey (dmuey_at_infiniplex.com)
Date: 12/29/03
- Next message: Anyoldcrap: "Re: String::CRC32"
- Previous message: Dan Muey: "RE: using SSL unable to write file"
- Next in thread: Jenda Krynicky: "Re: Listing Perl built in variables"
- Reply: Jenda Krynicky: "Re: Listing Perl built in variables"
- Maybe reply: Dan Muey: "RE: Listing Perl built in variables"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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
- Next message: Anyoldcrap: "Re: String::CRC32"
- Previous message: Dan Muey: "RE: using SSL unable to write file"
- Next in thread: Jenda Krynicky: "Re: Listing Perl built in variables"
- Reply: Jenda Krynicky: "Re: Listing Perl built in variables"
- Maybe reply: Dan Muey: "RE: Listing Perl built in variables"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|