#! /usr/bin/perl use warnings; use strict; use Getopt::Long; use Config::IniFiles; # SAMPLE : SET CONFIGURATION SAMPLE FILE TO READ. my ($sample,%ini,$cfg,%input_config_citi); GetOptions('config=s'=>\$sample); # TIE : OBTAIN THE CONFIG FILES CONTETNS $cfg= Config::IniFiles->new(-file=>$sample); tie %ini,'Config::IniFiles', (-file=>$sample); %input_config_citi=%{$ini{'hello'}}; #my @arr=$cfg->val('hello','i'); my @arr=$cfg->val('hello','j'); print "\n\nThe values are : \n\n"; print "$_\n",for(@arr); #### # # # # # # [hello] # # # # i=abc i=def i=ghi i=jkl i=mno j=abc def ghi jkl mno pqrs tuv wxyz