Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: How to initialize all variables

by SFLEX (Chaplain)
on Sep 12, 2010 at 12:00 UTC ( [id://859837]=note: print w/replies, xml ) Need Help??


in reply to How to initialize all variables

Maybe I'm way off or kinda close.

What I think you want is to use
use vars qw( $VERSION $Other_Variables );
But that is almost like our $VERSION;

This is a code to show you what is initialized like variables, module and other goodies.
my $return_main = ''; foreach my $key (keys %main::) { $return_main .= "$key = $main::{$key}\n"; } print $return_main;

I sometimes run it to see what was loaded.

Also if you want to see all the envirament variables use this.
my $return_env = ''; foreach my $key (keys %ENV) { $return_env .= "$key = $ENV{$key}\n"; } print $return_env;

If this helps you out, then cool dude........

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://859837]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others scrutinizing the Monastery: (4)
As of 2024-06-22 02:28 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?
    erzuuli‥ 🛈The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.