P is for Practical | |
PerlMonks |
Re: Substituting tokens into configuration valuesby dbush (Deacon) |
on Mar 20, 2003 at 17:42 UTC ( [id://244661]=note: print w/replies, xml ) | Need Help?? |
Many thanks (and a ++ tomorrow) to zby, crouchingpenguin, dakkar, robartes, Jenda and hiseldl for their insightful replies. The solution I have come up with is to use the tie functionality within Config::IniFiles and a slightly modified version of robartes regular expression approach. The while loop handles nested tokens (unlikely as they are in my case). The following is a code snippet of the approach I intend to use. Comments welcome.
The other modules mentioned look interesting (esp. Win32::Daemon::Simple) but I'm afraid I'm up against a bit of a deadline. I also didn't mention that the configuration file must be a standard ini as I share it with some C programs. Thanks again, Update: Corrected output typo.
In Section
Seekers of Perl Wisdom
|
|