open(CONFIG,"config_file") or die $_; while (<CONFIG>) { chomp; next if /^\s*\#/; next unless /=/; my ($key, $variable) = split(/=/,$_,2); $variable =~ s/(\$(\w+))/$config{$2}/g; $config{$key} = $variable; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
RE: Config file parser
by chromatic (Archbishop) on Apr 17, 2000 at 02:08 UTC | |
|
RE: Config file parser
by turnstep (Parson) on Apr 17, 2000 at 02:55 UTC | |
by stephen (Priest) on Apr 17, 2000 at 04:40 UTC | |
|
Re: Config file parser
by Anonymous Monk on Jan 07, 2003 at 21:32 UTC | |
|
RE: Config file parser
by kop (Initiate) on May 13, 2000 at 02:35 UTC | |
|
RE: Config file parser
by princepawn (Parson) on Jul 31, 2000 at 17:14 UTC |