#!/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); my $revwords = join(" ", reverse split(" ", $string)); print $revwords, "\n";