Posted on 2008-05-15 14:51:16-07 by ziyunxiao
Can anyone help with using option allow_multiple?
Here is my sample. INI:
[matrix] key=value1 key=value2 key=value3
I want the result is
$hash->{matrix}->{key}[0] is value1 $hash->{matrix}->{key}[0] is value2 and so on
How to use option allow_multiple to get the result? Thanks a lot. robin
Direct Responses: 7888 | Write a response
Posted on 2008-05-15 15:54:32-07 by jenda in response to 7887
Re: Can anyone help with using option allow_multiple?
use Config::IniHash; use Data::Dumper; $Config = ReadINI \*DATA, allow_multiple => 1; print Dumper(\$Config); __DATA__ [matrix] key=value1 key=value2 key=value3

Seems to work fine for me.
Jenda

Direct Responses: 7889 | Write a response
Posted on 2008-05-15 20:11:11-07 by ziyunxiao in response to 7888
Re: Can anyone help with using option allow_multiple?
Thank you very much! I found where I'm wrong for this case.
Direct Responses: Write a response
Perl Weekly newsletter
A free weekly newsletter for people who are busy to read all the blogs. click here to check it out.