[Section2] user1=pass1:50 user2=pass2:51 #### tie my %ini, 'Config::IniFiles', ( -file => "MyConfig.ini" ); #### foreach $user (keys %{$ini{'Section2'}}) { ($pass, $uid) = split /:/, $ini{'accounts'}{$user}; #do something with the values here }