in reply to Generic output file

The most primitive way is the same as with shell scripts: write your config file in Perl and require (or do) it. You can also use an existing Config-related module or parse your arbitrary config files by hand (see open, I/O Operators, perlretut).