my $var = "foo bar"; my @vals = split ' ', $var; # if you need something more complex, use a regex for the pattern