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
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>