in reply to splitting on multiple delimiters

I think the core module, Text::ParseWords, does what you want:
use strict; use warnings; use Data::Dumper; use Text::ParseWords; my $str = 'command1 command2 command3 "command4 --some-arg arg --some- +other-arg 2" command5'; my @words = shellwords($str); print Dumper(\@words);

prints:

$VAR1 = [ 'command1', 'command2', 'command3', 'command4 --some-arg arg --some-other-arg 2', 'command5' ];