Cool/useful short examples of Perl?

Dave Hodgkinson davehodg at gmail.com
Mon May 30 20:03:51 BST 2011


On 30 May 2011, at 19:47, Philip Newton wrote:

> 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....

I think his modem just had a small fit.



More information about the london.pm mailing list