On Dec 13, Ryan Fischer said:

>Bleh.  You learn something new every day.  But, if anything, I'd say
>that's a glaring bug and not a feature.  translations are supposed to
>replace one character with another.  If no character is specified, the
>most intuitive thing to happen is an omission.  What happens now is
>incredibly counter-intuitive.

And incredibly documented.  From 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.

And this is how the tr(1) utility works.

-- 
Jeff "japhy" Pinyan      [EMAIL PROTECTED]      http://www.pobox.com/~japhy/
RPI Acacia brother #734   http://www.perlmonks.org/   http://www.cpan.org/
** Look for "Regular Expressions in Perl" published by Manning, in 2002 **
<stu> what does y/// stand for?  <tenderpuss> why, yansliterate of course.

Reply via email to