Cool/useful short examples of Perl?
Philip Newton
philip.newton at gmail.com
Mon May 30 19:47:04 BST 2011
On Mon, May 30, 2011 at 17:59, Uri Guttman <uri at stemsystems.com> wrote:
>
> # Here is a simple and fast way to load and save a simple config file
> # made of key=value lines.
>
> my %conf = read_file( $file_name ) =~ /^(\w+)=(\.*)$/mg ;
> write_file( $file_name, {atomic => 1}, map "$_=$conf{$_}\n", keys %conf ;
I wonder what kind of configuration you use, where values can consist
only of one or more dots....
Cheers,
Philip
--
Philip Newton <philip.newton at gmail.com>
More information about the london.pm
mailing list