in reply to Re: most efficient regex to delete duplicate words (boo)
in thread most efficient regex to delete duplicate words

I always perfer:

1 while (EXPR)

instead of:

while (EXPR) {}

Simply because the '1 while' sticks out at the front where as the empty {} tends to get lost. I find that '1 while' immediately flags this perl idiom and makes it easier for me to pick it out.

-Blake

Replies are listed 'Best First'.
Re: Re: Re: most efficient regex to delete duplicate words (boo)
by Ven'Tatsu (Deacon) on Aug 14, 2001 at 07:32 UTC
    1 while (EXPR): will also avoid the slight over head of entering and exiting the lexical context created by the BLOCK in while (EXPR) {} Perl might be smart enough to optimise the out the empty block though.
Re: Re: Re: most efficient regex to delete duplicate words (boo)
by mugwumpjism (Hermit) on Aug 14, 2001 at 03:50 UTC

    What's wrong with:

    "chill" while (EXPR);

    ???