system($scalar) uses /bin/sh to interpret the command $scalar. What you want is:
# get the command and args into @array somehow
# for example, for "ls -al --color '/home/me/some directory'"
# you want something like:
@array = ( 'ls', '-al', '--color', '/home/me/some directory' );
# then run ls, passing ls as its name and the rest as its args
system { $array[0] } @array;
This means the system command actually has ls in it twice - that's not a bug, it lets you do things like
system { 'bash' } ( '/bin/sh' );
to make bash think it was invoked as /bin/sh. |