--- Stephen Reppucci <[EMAIL PROTECTED]> wrote:
> 
> From 'perldoc perlop':
> 
>       If the REPLACEMENTLIST is
>       empty, the SEARCHLIST is replicated.  This latter
>       is useful for counting characters in a class or
>       for squashing character sequences in a class.
> 
> As Ronald suggested, use the /d qualifier.

Right -- I feel kind of foolish because I read that page of
"Programming Perl" looking for a /g qualifier (I was wondering if that
would change the results), but instead of reading what was there I just
saw that there was no /g.  If I had actually looked at what /d does,
then I would never have had to ask... sorry all and thanks for pointing
the way.

> (Am I the only one who rolls their eyes and coughs when I come
> across something like this in someone else's code? :
> 
>    s/([^a-zA-Z])//g;

I don't remember posting it like that... if I did then it was a typo
b/c the code doesn't try to capture the removed data (that's why I'm
using tr/// in the first place).



Erik

__________________________________________________
Do you Yahoo!?
Faith Hill - Exclusive Performances, Videos & More
http://faith.yahoo.com
_______________________________________________
Boston-pm mailing list
[EMAIL PROTECTED]
http://mail.pm.org/mailman/listinfo/boston-pm

Reply via email to