I have an INI file with data in it like:

[Servers]

List1 = "server01 server02 server03 server04"

List2 = .....

Unfortunately, this line "my @Server = $List{$iniList};" ends up with the contents of List1.  Is split the only way to pull these oout?

Thanks.

 

use Win32 ();
use strict;
use warnings;
use Win32::AdminMisc;

my $version = "4.0";

my @Servers;my $msg = '';my $counter = 0;my $iniList;my $iniSection;my %List;

#Read INI File

if (! "./servers.ini"){
 
 my $value = Win32::MsgBox("The file Uptime.ini could not be located.  Make sure is is in the ".
 "same directory as Uptime.exe",64,"File not found error!");
 
 exit (1);
 

 
my @iniSection = Win32::AdminMisc::ReadINI( "./servers.ini", "", "" );

foreach $iniSection (@iniSection) {
 
 my @iniList = Win32::AdminMisc::ReadINI( "./servers.ini", $iniSection, "" );

 foreach $iniList (@iniList) {
 
  $List{$iniList} = Win32::AdminMisc::ReadINI( "./servers.ini", $iniSection, $iniList );
  
  my @Server = $List{$iniList};
  
  foreach my $server (sort (@Server) ){
    
  }
 } 
}

 

 


Do You Yahoo!?
Yahoo! Small Business - Try our new Resources site!
_______________________________________________
ActivePerl mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to