shn4002 has asked for the wisdom of the Perl Monks concerning the following question:

Dear Monks,
Would you please be so kind and tell me what are all the Windows 98 variables that I can get out of %ENV? How may I list to see what these are?

Thanks in advance for your help!

Replies are listed 'Best First'.
Re: %ENV on Windows 98
by ikegami (Patriarch) on Aug 17, 2004 at 00:02 UTC

    If you have a Win98 machine, you can run:
    C:\> set or
    C:\> perl -e "printf(qq{%s=%s\n}, $_, $ENV{$_}) foreach (sort(keys(%ENV)));"
    too see those set on that computer. Is there something specific for which you are looking?

Re: %ENV on Windows 98
by csuhockey3 (Curate) on Aug 17, 2004 at 02:23 UTC
    is this what you are looking for?
    foreach $key (sort(keys %ENV)) { print "VARIABLE $key = $ENV{$key}\n"; }
    Which will give you below, with associated values
    DOCUMENT_ROOT  
    HTTP_COOKIE    
    HTTP_HOST      
    HTTP_REFERER   
    HTTP_USER_AGENT  
    HTTPS     
    PATH    
    QUERY_STRING   
    REMOTE_ADDR  
    REMOTE_HOST 
    REMOTE_PORT     
    REMOTE_USER 
    REQUEST_METHOD    
    REQUEST URI   
    SCRIPT_FILENAME  
    SCRIPT_NAME      
    SERVER_ADMIN      
    SERVER_NAME     
    SERVER_PORT      
    SERVER_SOFTWARE
    

    Did that answer your question?

    update: ikegami has a nice one liner. Are you looking for that, more like mine or something else?
      Dear Monks ikegami and csuhockey3,
      You are so wonderful! Thanks for the help you're giving to this novice!
      Have a good one!