How can I access INI files from Perl?

前端 未结 7 1519
野趣味
野趣味 2020-12-09 11:30

What is the best way to parse INI file in Perl and convert it to hash?

7条回答
  •  借酒劲吻你
    2020-12-09 11:40

    Config::Tiny is very easy and straightforward to use.

    $Config = Config::Tiny->read( 'file.conf' );
    
    my $one = $Config->{section}->{one};
    my $Foo = $Config->{section}->{Foo};
    

提交回复
热议问题