No-one has mentioned do... perldoc -f do
You might like to use "do" to read in a program configuration File. Manual error checking can be done this way:# read in config files: system first, then user for $file ("/share/prog/defaults.rc", "$ENV{HOME}/.someprogrc") { unless ($return = do $file) { warn "couldn't parse $file: $@" if $@; warn "couldn't do $file: $!" unless defined $return; warn "couldn't run $file" unless $return; } }
In reply to Re: Saving application configuration to files
by maa
in thread Saving application configuration to files
by crabbdean
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |