#!/usr/local/bin/perl use strict; use warnings; my $string = ' Yoda said, "can you see this?" '; my @allwords = split(" ", $string); my $revwords = join(" ", reverse @allwords); print $rewords, "\n";