#lie about myself $str='i am a sexy bastard'; #split the words @words=split ' ', $str; #revers 'em @words=reverse @words; #join 'em $reversestr=join ' ', @words;
Edit by tye to include wine's suggestion
In reply to Re: How do I reverse a string or the words in a string?
by pokemonk
in thread How do I reverse a string or the words in a string?
by vroom
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |