Commit | Line | Data |
---|---|---|
154e51a4 | 1 | ;# $Header: importenv.pl,v 3.0.1.1 90/08/09 03:56:38 lwall Locked $ |
378cc40b | 2 | |
3 | ;# This file, when interpreted, pulls the environment into normal variables. | |
4 | ;# Usage: | |
154e51a4 | 5 | ;# require 'importenv.pl'; |
378cc40b | 6 | ;# or |
7 | ;# #include <importenv.pl> | |
8 | ||
9 | local($tmp,$key) = ''; | |
10 | ||
11 | foreach $key (keys(ENV)) { | |
12 | $tmp .= "\$$key = \$ENV{'$key'};" if $key =~ /^[A-Za-z]\w*$/; | |
13 | } | |
14 | eval $tmp; | |
a687059c | 15 | |
16 | 1; |