in reply to passing a command line argument

bart is correct, but special shell quoting modules may be overkill. I think you can probably get away with the multi argument version of system iff you don't need the output to come back from the qx.

You can also open my $in, "-|", qw(program), "$sting" or die $! to get the output and use the multi-arg pipe. Huzzah.

-Paul