use Text::ParseWords; # core module my $args = q(-w 70 -c 80 -r 'bla bla'); my @ARGS = shellwords($args); # this is how to keep single-quotes # [but it's probably not what you want for open()] my @ARGS2 = parse_line('\s+', 1, $args);