use Config::IniFiles; use strict; #try to have this all the time use warnings; #try to have this all the time my $cfg = new Config::IniFiles( -file => uc "test.ini", -nocase => 1); #uc is not needed, but does not cause trouble either my @FileExten = $cfg->Parameters("FileExten"); #change bareword to a string foreach my $FileExten (@FileExten) #explicitly declare your variable, same with other places { my $FileExt = uc $cfg->val("FileExten", $FileExten); #again, bareword print "FileExtension is $FileExt\n"; #you don't have a variable called $FileExtension, so I removed the $ }