On Saturday, May 25, 2002, at 05:22 , mark wrote:

first off let me complement you on raising a question
that is not often addressed both in terms of what the
documentation 'asserts' and that at times it is not always clear.

> $val=~tr/this//c

you will forgive me the moment of levity here[1],
but For the life of me I really haven't a clue
since I can't get it to say anything useful.

so from your illustration I would presume that
the '/c' option is there so that perl can say

        "my what a facinating transliteration."

traditionally we have used tr, { cf man tr or perldoc -f tr }
to do things of the form listed in the documentation..... most
of which we do with things like perldoc -f uc or -f lc and
leave the heavy lifting to RegEx solutions....

I can generate say:

        we get :this Is a sentence: was :this Is a sentence:
        we get :this is a sentence: was :this Is a sentence:

from

        #!/usr/bin/perl -w
        use strict;
        my $sentance = 'this Is a sentence';
        my $val = $sentance;
        $val=~tr/this//c ;
        print "we get :$val: was :$sentance:\n";
        $val=~tr/I/i/ ;
        print "we get :$val: was :$sentance:\n";

but I am sure that one of the devotee's of the tr kults
will of course defend the honor of 'tr'...... I was a
sed freak back then.... now I'm all messed up on perl's
RegEx tricks....

ciao
drieux

---

[1] Trust Me, I'm not laughing at you,
        I'm laughing near you...


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to