Your sample above should work with the following:
$test = q/RunSql "delete sometable where strike like '%[A-Za-z]%'"/;
$test =~ s/'/''/g;
$sql = "update job set cmd='$test' where jobname='somejob'";
You use '' to quote the string that you set "cmd" to, so you just need to make sure that any ' quotes
inside that string are doubled.
There are other methods as well - placeholders for example when using DBI or Sybase::CTlib as mentioned by others in this thread, but there are drawbacks to those as well - nothing's perfect :-)
Michael