diff options
author | 2007-12-24 02:29:48 +0000 | |
---|---|---|
committer | 2007-12-24 02:29:48 +0000 | |
commit | c57661aed688963c59cea8ed1429381d1c73dac0 (patch) | |
tree | 55e9feb37fcdac455ea99dff7e2ab261df7add79 /client | |
parent | ok, where to begin.... (diff) | |
download | scire-c57661aed688963c59cea8ed1429381d1c73dac0.tar.gz scire-c57661aed688963c59cea8ed1429381d1c73dac0.tar.bz2 scire-c57661aed688963c59cea8ed1429381d1c73dac0.zip |
use a match and capture instead of split for parsing config file lines
svn path=/branches/new-fu/; revision=257
Diffstat (limited to 'client')
-rwxr-xr-x | client/scireclient.pl | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/client/scireclient.pl b/client/scireclient.pl index 3e03049..47fd7b9 100755 --- a/client/scireclient.pl +++ b/client/scireclient.pl @@ -96,8 +96,9 @@ sub read_config { while (<FH>) { chomp; next if /^\s*(?:#|$)/; - my ($key,$val) = split /=/; - $conf{lc($key)} = $val; + if(/^\s*(.+?)\s*=\s*(.+?)\s*(?:#.*)?$/) { + $conf{lc($1)} = $2; + } } close(FH) or die("Couldn't close the config file ${SCIRE_CONFIG_FILE}: $!"); } |