home *** CD-ROM | disk | FTP | other *** search
/ Borland Programmer's Resource / Borland_Programmers_Resource_CD_1995.iso / ntcode / ntperlb / lib / impenv.pl < prev    next >
Encoding:
Text File  |  1995-05-19  |  389 b   |  17 lines

  1. ;# $Header: /pdt/isdk/progtools/ntperl/lib/impenv.pl,v 1.1 1993/05/05 21:19:59 isdk 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.