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; }
In reply to Config file parser by ishamael
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |