in reply to transliteration d flag not working as expected
you can achieve the desired result by combining two tr
DB<112> $_="alter" => "alter" DB<113> tr/this//cd # delete anything except t,h,i,s => 4 DB<114> $_ => "t" DB<115> tr/this/flip/ # translate => 1 DB<116> $_ => "f"
Cheers Rolf
( addicted to the Perl Programming Language)
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: transliteration d flag not working as expected
by AnomalousMonk (Archbishop) on Jun 09, 2013 at 12:04 UTC | |
by LanX (Sage) on Jun 09, 2013 at 12:29 UTC | |
by AnomalousMonk (Archbishop) on Jun 09, 2013 at 13:14 UTC |
In Section
Seekers of Perl Wisdom