in reply to undocumented tr special behavior for single-quoted transform
From the same perldoc perlop#Gory-details-of-parsing-quoted-constructs
'' , q//, tr''', y''', the replacement of s''' The only interpolation is removal of \ from pairs of \\ . Therefore "-" in tr''' and y''' is treated literally as a hyphen and no character range is available. \1 in the replacement of s''' does not work as $1 .
HTH
Cheers Rolf
(addicted to the Perl Programming Language and ☆☆☆☆ :)
Wikisyntax for the Monastery
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: undocumented tr special behavior for single-quoted transform
by Anonymous Monk on Jan 06, 2018 at 10:45 UTC | |
by LanX (Saint) on Jan 06, 2018 at 11:20 UTC |