This would tell you (and anyone who reads your code!) that values accessed using the hash came from outside the program. It also seems to clean up uninitialized varible issues... I don't know, it just seems right to use a hash to relate keys to values.#untested code! my %conf = (); foreach (`. /my/config.cfg; set`) { chomp; my ($var,$val) = /^\s*(.*?)\s*=\s*(.*)/; $conf{$var} = $val; }
In reply to Re: Dynamic variables and strict
by dewey
in thread Dynamic variables and strict
by solitaryrpr
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |