#!/usr/bin/perl -w use strict; my $test = "something something this"; $test =~ /(\S*)$/; print "Got $1\n";