Take a look at XML::Simple. It does exactly what you want:
use XML::Simple; my $options = XMLin ('teams.badDB') if -e 'teams.badDB'; # do stuff with $options $options->{'time'} = 15 * 60 if ! exists $options->{'time'}; $options->{'width'} = 200 if ! exists $options->{'width'}; # ... open outFile, '>', 'teams.badDB'; print outFile XMLout ($options); close outFile;
In reply to Re: How to save and reload my hash
by GrandFather
in thread How to save and reload my hash
by lepetitalbert
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |