#!/usr/bin/perl use strict; use warnings; my $string = "make test blub usw usf"; my ($a, $b) = $string =~ /^(\w+)\s(.*)$/; print "$a - $b\n";