my(@list) = "foo bar baz" =~ m< (\w+) [ ]? >xg; print "@list"; __output__ foo bar baz