home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 11 Util / 11-Util.zip / unixtool.zip / TOOLS / lib / perl / impenv.pl < prev    next >
Text File  |  2000-04-21  |  409b  |  17 lines

  1. ;# $Header: /tivoli/development/src/2.0/platform/tools/win32/gnu/perl-4.036/lib/impenv.pl,v 1.2 1996/07/29 21:20:08 jfk Exp $
  2.  
  3. ;# This file, when interpreted, pulls the environment into normal variables.
  4. ;# Usage:
  5. ;#    require '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.