This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Make pp_reverse fetch the lexical $_ from the correct pad
[perl5.git] / lib / importenv.pl
1 # This library is no longer being maintained, and is included for backward
2 # compatibility with Perl 4 programs which may require it.
3 # This legacy library is deprecated and will be removed in a future
4 # release of perl.
5
6 ;# This file, when interpreted, pulls the environment into normal variables.
7 ;# Usage:
8 ;#      require 'importenv.pl';
9 ;# or
10 ;#      #include <importenv.pl>
11
12 local($tmp,$key) = '';
13
14 foreach $key (keys(%ENV)) {
15     $tmp .= "\$$key = \$ENV{'$key'};" if $key =~ /^[A-Za-z]\w*$/;
16 }
17 eval $tmp;
18
19 1;