in reply to Parameters not in order by using Config::Tiny

UPDATE: never mind! Better choice of module as suggested by Corion will solve this issue.

Hashes don't store their keys in order, so that's why (keys %...) returns them in a way you don't expect. For the inner case, replace

(keys %{$config->{$section}})

with

(sort keys %{$config->{$section}}

For the outer loop, perhaps store the sections in array instead of a hash?

Dum Spiro Spero

Replies are listed 'Best First'.
Re^2: Parameters not in order by using Config::Tiny
by bhushanQA (Sexton) on Jul 06, 2015 at 13:34 UTC
    This "(sort keys %{$config->{$section}}" has solved my problem .. Thanks a lot :) good solution