[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

[MacPerl] About s/foo/bar/x



Can somebody straighten me out about the x switch in MacPerl regex? What I
*thought* was that it was just a formatting tool that said "ignore white space"
in the composition of the expression so that you could break these things up
like:
s/  (exp 1)     #comment
    exp 2       *comment
    (exp 3)/    
    $3$1/gsx    #comment
    
However, when I use this, regexen that were working fine suddenly go blind and
it appears to me that whitespace is also being ignored in the target text. So,
have I just completely misunderstood this and, if I have, what possible use is
the x switch if it is going to alter MacPerl's behavior in dealing with
something as prevalent and wildly varying as white space?

Inquiring minds want to know. 
    

Richard Gordon
Gordon Consulting & Design
Voice: 770-565-8267  Fax: 770-971-6887



===== Want to unsubscribe from this list?
===== Send mail with body "unsubscribe" to macperl-request@macperl.org