|
|
| laziness, impatience, and hubris | |
| PerlMonks |
Re: reversed hash doesn't identify keysby roboticus (Canon) |
| on Dec 11, 2012 at 22:33 UTC ( #1008415=note: print w/ replies, xml ) | Need Help?? |
|
If you want to reverse the letter order in a word, you can do that by splitting the word into characters (via split), and then rejoin them in the correct order:
Of course, you can combine it all into a single step:
Update: Or you could (as johngg pointed out) just use reverse, and it'll do the job without all the hoop-jumping-through-stuff. ...roboticus When your only tool is a hammer, all problems look like your thumb.
In Section
Seekers of Perl Wisdom
|
|
||||||||||||||||||||||||||