The goal is to turn a string like command "arg one" arg2 arg\ three into a string of tokens like ('command', 'arg one', 'arg2', 'arg three').
(Don't get confused — the goal here is not to start with @ARGV and do further processing, similar to Getopt::Std; there are a million modules for that already.)
shellwords() parse_cmdline() parseline()