in reply to How do I reverse a string or the words in a string?
$str = 'hacker. Perl another Just'; ($revwords = $str) =~ s/(\S+)/reverse $1/ge; $revwords = reverse $revwords