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

Re: The translate operator (was Re: [MacPerl] regex help)



Matthias Neeracher, <neeri@iis.ee.ethz.ch> wrote:

>sub fudd {
>   my($x) = $_[0];
>   $x =~ tr/r/w/;
>   $x;
>}
>
>print fudd("Be very, very quiet! I'm hunting rabbit\!n"); 

Vewy funny, Matthias!  Now I can do scwewy things to text with Pewl!

Wascally wabbit!

Just FYI, hewe's a quick vewsion as a BBEdit Pewl Filter, which opewates 
on entiwe selections of text, and deals with capitalization:

#!perl -pl
tr/[rR]/[wW]/;

--B

Brian McNett, Webmaster
*************************************************************
Mycoinfo. The world's first mycology e-journal.
http://www.mycoinfo.com/
*************************************************************


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