develooper Front page | perl.perl5.porters | Postings from November 2009

Re: "If" your subscript goes bump in the night

Thread Previous | Thread Next
From:
George Greer
Date:
November 2, 2009 16:33
Subject:
Re: "If" your subscript goes bump in the night
Message ID:
alpine.LFD.2.00.0911021929420.23303@ein.m-l.org
On Mon, 2 Nov 2009, H.Merijn Brand wrote:

> On Mon, 2 Nov 2009 22:13:47 +0100, demerphq <demerphq@gmail.com> wrote:
>
>> I have a strange feeling that tom means the "empty regex syntax".
>
> Darn :)
> Very well possible. To prevent that confusion I always use m// (or m{}),
> even with grep

Only time I've used that was in a construct like:

     @list = /(regex)/g;
     s///g if @list;

Although with qr// it wouldn't have been hard to do without.

>> Yeah. This is stupid. We should just do this as 'dor'.
>
> I don't think we will win that argument, but you've got my vote!

I'd certainly use it, and wish it was there already.  Not that 'dor' leaps 
out as a great name, but it is more descriptive than 'err' is.

-- 
George Greer

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About