Hi All,
Last week, someone mentioned the Config::IniFiles module for using .ini files.
I thought I would try it but I am having problems. I downloaded the latest
version (1.8) from CPAN, put the IniFiles.pm file in c:\perl\site\lib\config and
ran the test.pl program which worked.
When I try to run my own script on my own file, it fails to initialise a new ini
object. The script always halts with the "Unable to create new ini object"
message.
Perl is 5.005_03 Build 520.
Here is the script:
# Read the tppdsn.ini file using Config::IniFiles
# Eric Buller
# 06-Nov-2000
use Config::IniFiles;
my $ors = $\ || "\n";
$ini = new Config::IniFiles -file => "test.ini" or die "Unable to create new ini
object.\n";
@Sections = $ini->Sections;
foreach $Section (@Sections) {
print "Section $Section\n";
@Parameters = $ini->Parameters($Section);
foreach $Parameter (@Parameters) {
print " $Paramter = $ini->val($Section, $Parameter)\n";
}
}
I appreciate any suggestions.
Eric Buller
Medical Physics Computer Manager
London Regional Cancer Centre
_______________________________________________
Perl-Win32-Admin mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/perl-win32-admin