bhushanQA has asked for the wisdom of the Perl Monks concerning the following question:
while running this output coming like:: not able to return the hash reference of sections: whats wrong in this ??use warnings; use Config::IniFiles; sub readtestcase { my $ConfigFile = $_[0]; tie %ini_file, 'Config::IniFiles', ( -file => $ConfigFile ); foreach $ini_sect ( keys %ini_file ) { %$ini_sect = %{ $ini_file{$ini_sect} }; print "$ini_sect\n"; while( my( $key, $value ) = each %$ini_sect ) { print "$key: $value\n\n"; } return ( \%TEST_CASE, \%PRE_CONFIG, \%PROCESS_RESTART, \%ABCD, \%POST_CONFIG, \%DB_VALIDATION, ); } } readtestcase("file1.txt");
Name "main::TEST_CASE" used only once: possible typo at ./file.pl line + 29 Name "main::PRE_CONFIG" used only once: possible typo at ./file.pl lin +e 30 Name "main::ABCD" used only once: possible typo at ./file.pl line 31 Name "main::PROCESS_RESTART" used only once: possible typo at ./file.p +l line 32 Name "main::POST_CONFIG" used only once: possible typo at ./file.pl li +ne 33 Name "main::DB_VALIDATION" used only once: possible typo at ./file.pl +line 34
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: returning the hash reference
by Eily (Monsignor) on Mar 15, 2016 at 09:34 UTC | |
|
Re: returning the hash reference
by Discipulus (Canon) on Mar 15, 2016 at 08:59 UTC | |
by bhushanQA (Sexton) on Mar 15, 2016 at 09:35 UTC | |
by Eily (Monsignor) on Mar 15, 2016 at 09:39 UTC | |
by Discipulus (Canon) on Mar 15, 2016 at 10:39 UTC | |
|
Re: returning the hash reference
by Marshall (Canon) on Mar 15, 2016 at 21:38 UTC |