in reply to Translating letters
I wanted to know if there are quicker/better ways of translating numbers to letters. At the minute I am doing tr/etc/etc/g.
No, tr/// is hands down speed winner for char-by-bar translations where the ampping is known at compile time.
it doesn't feel nor look right when translating many many letters/numbers.
In most cases, it is possible to use the start-end range facility to produce compact and clear code.
If that is not the case for your application, post an example. You may be better off evaling a custom tr sub into existence.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Translating letters
by DaveMonk (Acolyte) on Apr 15, 2012 at 17:42 UTC | |
by BrowserUk (Patriarch) on Apr 15, 2012 at 17:56 UTC | |
by DaveMonk (Acolyte) on Apr 15, 2012 at 18:16 UTC | |
by BrowserUk (Patriarch) on Apr 15, 2012 at 19:34 UTC |