in reply to Config file

Config::Simple would be my first choice. Your "config"-code looks a bit like actual Perl content though and you might just want to read the file and eval each line.

Cheers,
PerlingTheUK