http://qs1969.pair.com?node_id=1095845


in reply to Re^2: How to make this substitutions without splitting the strings? (tr/// behavior)
in thread How to make this substitutions without splitting the strings?

Do you know of any documentation of this "leftmost match" feature in the tr/// built-in?
From perlop:

"If multiple transliterations are given for a character, only the first one is used:

tr/AAA/XYZ/

will transliterate any A to X."

  • Comment on Re^3: How to make this substitutions without splitting the strings? (tr/// behavior)
  • Download Code

Replies are listed 'Best First'.
Re^4: How to make this substitutions without splitting the strings? (tr/// behavior)
by AnomalousMonk (Archbishop) on Aug 01, 2014 at 05:34 UTC

    Ah, the undocumented, documented! That feels better! I looked for just this sort of assertion (a couple of times) and couldn't find it. Thanks!