#!/usr/bin/perl use strict; use warnings; my list = "This is my list"; list =~ /(\w+)\s(\w+)/; my $last = $2; my $the_rest = $1 print $the_rest # "This is my" print $last # "list";