- or download this
# SimplestConfig.pm
# SimplestConfig->new('filename') returns an object whose attributes
...
}
1;
- or download this
#!/usr/bin/perl -w
# test1.pl
...
$cfg->{a} = 1;
$cfg->{b} = 2;
$cfg->{c} = 3;
- or download this
#!/usr/bin/perl -w
# test2.pl
...
my $cfg = SimplestConfig->new("$ENV{HOME}/test.cfg");
$cfg->{b} = 20;
$cfg->{d} = 4;
- or download this
$ more test.cfg
test.cfg: No such file or directory
$ ./test1.pl
...
b=20
c=3
d=4