[comp.lang.perl] Squeeze, Complement and Delete

nwinton@axion.bt.co.uk (Neil Winton) (11/09/90)

Now maybe I missed something, but in the Patch 29--37 blurb there was the
following comment:

    The tr/// translation function now understands c, d and s options, just
    like the tr program.  (Well, almost just like.  The d option only
    deletes characters that aren't in the replacement string.)  The
    c complementes the character class to match and the s option squishes
    out multiple occurrences of any replacement class characters.

Ok.  Sure enough, there is code in the the lexer which recognises
tr/foo/bar/[dcs] as far as I can tell.  However, I can't seem to find any
mention of this in the manual and, worse, I can't figure out how/if it
works.

Any and all enlightenment (tr-wise) gratefully accepted.  Thanks Larry and
keep up the good work!  (By the way, how do you manage to fit in your "real"
work for JPL?  Or is this your real work, and JPL really stands for
Just (another) Perl Laboratory ... :-)

	Neil

E-Mail (UUCP)  NWinton@axion.bt.co.uk (...!uunet!mcsun!axion.bt.co.uk!nwinton)
Organisation   British Telecom Research Laboratories (RT3132)
Snail Mail     306 SSTF, BTRL, Martlesham Heath, IPSWICH IP5 7RE, UK
Telephone      +44 473 646079 (or +44 473 643210)
*** This line intentionally left justified ***