home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD1.mdf / perl / perl30 / importen.pl < prev    next >
Text File  |  1990-05-09  |  358b  |  17 lines

  1. ;# $Header: importenv.pl,v 3.0 89/10/18 15:19:39 lwall Locked $
  2.  
  3. ;# This file, when interpreted, pulls the environment into normal variables.
  4. ;# Usage:
  5. ;#    do 'importenv.pl';
  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;
  15.  
  16. 1;
  17.