$revstr = reverse($str); # reversed by character $revwords = join(" ", reverse split(/ /, $str));
Originally posted as a Categorized Question.
In reply to How do I reverse a string or the words in a string? by vroom
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |