#!/usr/bin/perl use strict; use warnings; use Config::IniFiles; my %ini; tie %ini, 'Config::IniFiles', ( -file => "anyfile.ini" ); # Parameters are accessible like this: $ini{Section}{Parameter} foreach my $section ( keys %ini ) { my @parameters = keys %{$ini{$section}}; # do something with the @parameters for this $section }