I may be way off target - but if you are coming to Perl from
a shell scripting language, you will be happy to know that
environment variables are conveniently available from the
%ENV hash. Try this out:
while (my($key,$val) = each %ENV) {
print "$key => $val\n";
}
If this is not what you need, then please be more specific.
UPDATE:
The 'HOME' key contains the path to a user's home dir,
the 'USERNAME' contains the user's username, but you can't
get their password from the EVIRONMENT - that would be
BAD BAD BAD! Think about it.
UPDATE2:
If you are looking for a configuration file like perrin
suggested below, check out How to assign a variable with a value read from a config file.
jeffa
"You can pick your friends and you can pick your nose,
but you can't pick your friend's nose."
|