in reply to Fastest way to store and retrieve configuration information?
The combination of Data::Dumper and do is very handy for that.
use Fcntl qw/:flock/; use Data::Dumper; # Get stored config my $config = do( '/path/to/my_config.cfg') || {}; # . . . { # Serialize current config open my $fh, '>', '/path/to/my_config.cfg' or die $!; flock $fh, LOCK_EX; print $fh Dumper($config); }
After Compline,
Zaxo
|
|---|