in reply to Which is the better option?
Your file format would have to change a little, but it would be quite similar:
Then, something like this:[pupil1] maths=1_80:2_90 english=2_75:3_75 lastlogin=May 21 [pupil2] maths=1_68:2_87 english=2_75:3_75 lastlogin=May 12
might get you what you need.use Config::IniFiles; my $cfg = new Config::IniFiles( -file => "/path/configfile.ini" ); my $pupil1_maths = $cfg->val( 'pupil1', 'maths' ); my @pupil1_maths = split /:/, $pupil1_maths;
But Config::IniFiles only reads the values - it does not offer a way to write/update them. I see that Config::Simple does have writing methods, so - if you go with this file format, you may want to take some time to look into that one.
I hope that helps you...