use warnings; use strict; my $line = '2011-01-01 15:34:554 some words and numbers then email@host.com'; my @tokens = split /\s+/, $line; print join ' ', @tokens[0..1,-1], "\n"; __END__ 2011-01-01 15:34:554 email@host.com