in reply to Handling different sections in config files
Then simply use Config::IniFiles to tie the file to a hash:[Section2] user1=pass1:50 user2=pass2:51
Then to retrieve the data from 'Section2':tie my %ini, 'Config::IniFiles', ( -file => "MyConfig.ini" );
-Nitroxforeach $user (keys %{$ini{'Section2'}}) { ($pass, $uid) = split /:/, $ini{'accounts'}{$user}; #do something with the values here }
|
|---|