[2660] in BarnOwl Developers

home help back first fref pref prev next nref lref last post

Re: [PATCH] add a random zsig function

daemon@ATHENA.MIT.EDU (Kevin Riggle)
Tue Sep 21 00:26:26 2010

Cc: barnowl-dev <barnowl-dev@mit.edu>
From: Kevin Riggle <kevinr@free-dissociation.com>
To: Zev Benjamin <zev@mit.edu>
In-reply-to: <4C982F58.1090303@mit.edu>
Date: Tue, 21 Sep 2010 00:26:21 -0400

Excerpts from Zev Benjamin's message of Tue Sep 21 00:06:48 -0400 2010:
> > +    my $zsig = "@{[$lines[int(rand(scalar @lines))]]}";
> 
> Why do you create of a list ref, deference it, and do string
> interpolation on it?
> 
It's a trick I picked up at BPS to embed semi-arbitrary code in string 
interpolations, but a bit of experimenting suggests I don't need it here.  
(I thought I needed it for hash references, but experimentation suggests that's
wrong too.  I wonder why I ever learned it.)  Updated patch follows.

- Kevin

home help back first fref pref prev next nref lref last post