in reply to Re: Reading from an INI file
in thread Reading from an INI file
(Note: if you want to use AdminMisc, either use PPM (if you're using ActiveState), or else use the links at Roth's site. It's on CPAN but http://search.cpan.org for some reason doesn't return a match.)foreach my $section (Win32::AdminMisc::ReadINI ('some.ini', '', '')) { foreach my $key (Win32::AdminMisc::ReadINI ('some.ini', $section, '')) { my $value = Win32::AdminMisc::ReadINI ('some.ini', $section, $key); } }
Finally, in the book Data Munging in Perl (written by davorg), there's a longish discussion about using the high-powered Parse::RecDescent module for parsing INI files.
-- Frag.
|
|---|