in reply to System commands and curly braces

You're invoking the shell, and those characters have special meaning to your shell.

$ echo some_command a={1,2},{3,4} some_command a=1,3 a=1,4 a=2,3 a=2,4

You need to pass a shell literal that produces the desired arg, not the arg itself.

$ echo some_command 'a={1,2},{3,4}' some_command a={1,2},{3,4}
sub text_to_sh_literal { my ($s) = @_; s/'/'\\''/g; return "'$s'"; } my $arg_lit = text_to_sh_literal($arg); `some_command $arg_lit`

You could also avoid the shell.

open(my $fh, '-|', 'some_command', $arg); <$fh>