my $string = "put your own text here"; my @a = $string =~ /(\w+) (\w+) (\w+) (\w+) (\w+)/; print join ":", @a;